Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path.py installed as version 0.0.0 #809

Closed
mforbes opened this issue Jun 3, 2016 · 5 comments
Closed

path.py installed as version 0.0.0 #809

mforbes opened this issue Jun 3, 2016 · 5 comments

Comments

@mforbes
Copy link

mforbes commented Jun 3, 2016

For some reason, installing path.py with conda results in version 0.0.0:

$ conda create -n tst_path python
...
$ . activate tst_path
...
$ conda install path.py
...
$ python -c "import path;print(path.__version__)"
0.0.0
$ conda list
$ conda list
# packages in environment at /data/apps/anaconda/envs/tst_path:
#
husl                      4.0.3                     <pip>
mmfutils                  0.4.7                     <pip>
openssl                   1.0.2h                        1    defaults
path.py                   8.2.1                    py27_0    defaults
pip                       8.1.1                    py27_1    defaults
python                    2.7.11                        0    defaults
readline                  6.2                           2    <unknown>
setuptools                21.2.1                   py27_0    defaults
sqlite                    3.13.0                        0    defaults
tk                        8.5.18                        0    <unknown>
wheel                     0.29.0                   py27_0    defaults
zlib                      1.2.8                         3    defaults
zope.interface            4.1.3                     <pip>
$ pip freeze
$ pip freeze
husl==4.0.3
mmfutils==0.4.7
path.py==0.0.0
zope.interface==4.1.3
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

The following may be related:

The issue is the same with python 2 and python 3 environments.

Pip works fine: pip install path.py.

@ilanschnell
Copy link
Contributor

This is probably a bug in the upstream path.py code. We simply use python setup.py install to create the path.py package. I'm not sure what kind of magic pip install path.py does.

@nirvana-msu
Copy link

nirvana-msu commented Oct 14, 2017

Getting exactly the same problem with automat:

$ conda create -n test-automat python
<...>

$ source activate test-automat

$ conda install automat
<...>

$ conda list
<...>
automat                   0.5.0                    py36_0
<...>

$ pip freeze
<...>
Automat==0.0.0
<...>

When automat is installed with pip, pip freeze reports correct version

@nirvana-msu
Copy link

nirvana-msu commented Oct 14, 2017

Both automat and path.py manage versioning through setuptools_scm. After some searching, I came across a similar problem here. The problem is that when setuptools_scm is used, github package does not contain the version - only PyPi package does. So when building a corresponding conda package, one needs to reference PyPi package and not github package in the recipe/meta.yaml, which is what the corresponding PR addressed.

So then I checked the meta.yml for automat-feedstock in conda-forge and I can see that it incorrectly references github package, which makes it impossible for pip to figure out the version.

It seems like we need to update the build recipe in conda-forge/automat-feedstock, but I'm not sure how exactly this process works. I've raised an issue in that repo... would be good if someone could help.

I also checked the conda package from anaconda channel, and to my surprise it does reference PyPi package in the build recipe, however I still have the same problem. I even tried cleaning my conda cache (to make sure I do not use the package from conda-forge) and double-checked that my automat package is indeed installed from the anaconda channel using conda list --explicit. For some reason pip freeze still gives me version 0.0.0...

I also checked the conda package from anaconda channel, and to my surprise it does reference PyPi package in the build recipe, however I still have the same problem. I even tried cleaning my conda cache (to make sure I do not use the package from conda-forge) and double-checked that my automat package is indeed installed from the anaconda channel using conda list --explicit. For some reason pip freeze still gives me version 0.0.0...

After some more poking around, I've discovered that installing clinicalgraphics/automat conda package results in pip freeze reporting correct version 0.5.0. So there's something wrong in the builds for anaconda and conda-forge channels that's done correctly in clinicalgraphics channel. So at least I can fix the immediate issue with my build by putting - clinicalgraphics::automat=0.5.* in my environment.yml file. Would be nice if someone who understands how conda builds work could look at this...

@nehaljwani
Copy link

The new build of path.py displays the correct version:

(root) [nwani@wormhole ~]$ conda list -c path.py
defaults::path.py-10.3.1-py27hc258cac_0

(root) [nwani@wormhole ~]$ pip freeze | grep path.py
path.py==10.3.1

@nehaljwani
Copy link

nehaljwani commented Oct 15, 2017

The new build of automat displays the correct version:

(base) [nwani@centos6x64 aggregate]$ conda list -c automat
defaults::automat-0.6.0-py36ha140c00_0

(base) [nwani@centos6x64 aggregate]$ pip freeze | grep -i automat
Automat==0.6.0

Recipe at: https://github.com/AnacondaRecipes/automat-feedstock/blob/master/recipe/meta.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants