does conda packaging best practice include egg files and .pth files?

0 views
Skip to first unread message

David S

unread,
Jan 11, 2017, 12:30:58 PM1/11/17
to conda - Public
I'm maintaining a multi-user conda environment, and I'm looking at adding a conda package whose build script does

python setup.py install

it looks like the package just creates two files

package.pth
package*.egg

in my environments site-packages area. 

The .pth file looks benign, it just lists the egg file, that is no other PYTHONPATH manip via site.py's processing of it (like conda-verify flags easy_install.pth files that can collide with one another, but I guess it doesn't complain about egg files in general), however I've got the sense that egg files and .pth files are not a "best practice" for conda, with the exception of using .pth for develop versions.

Is this wrong? If switching to

python setup.py install --single-version-externally-managed

is a best practice for conda packaging, I'm sure the author would appreciate knowing. 

For example, does conda-forge have stricter rules before accepting packages? Like, no egg files? I don't have enough knowledge of egg files to evaluate, but my feeling is they are problematic, I'd rather see the python package in its own directory.

best,

David

Michael Sarahan

unread,
Jan 11, 2017, 1:10:12 PM1/11/17
to David S, conda - Public
Yes, having eggs and pth files is discouraged.  Authors of recipes at conda-forge are strongly encouraged to use

python setup.py install --single-version-externally-managed --record=record.txt

to avoid the egg.  This is necessary for any package that uses setuptools in setup.py for its setup function.

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/9941048a-26a7-4bf8-884d-23689d084751%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Chris Barker - NOAA Federal

unread,
Jan 11, 2017, 8:08:20 PM1/11/17
to Michael Sarahan, David S, conda - Public
You can also use pip:

pip install ./

It will call setuptools with all the right flags.

It'll also work for raw distutils packages.

-CHB

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages