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

Support requiring from developmental releases #875

Closed
tuukkamustonen opened this issue Dec 8, 2016 · 7 comments
Closed

Support requiring from developmental releases #875

tuukkamustonen opened this issue Dec 8, 2016 · 7 comments

Comments

@tuukkamustonen
Copy link

With following in setup.py:

install_requires=[
    'mypackage==1.0.0.dev1'
]

python setup.py develop:

Installed /home/musttu/XXX
Processing dependencies for wires-aws==2.2.1.dev0+ng42323d9.d20161208
Searching for mypackage==1.0.0.dev1
Reading https://INTRA-PYPI/index/+simple/mypackage/
Authenticating as musttu for https://INTRA-PYPI/index/+simple/mypackage/ (from .pypirc)
No local packages or working download links found for mypackage==1.0.0.dev1
error: Could not find suitable distribution for Requirement.parse('mypackage==1.0.0dev1')

Looks like it searches PyPI (or our company-devpi in this case) for matching version, but just doesn't find/accept one when you use developmental release as version identifier.

https://www.python.org/dev/peps/pep-0440/#developmental-releases

@tuukkamustonen tuukkamustonen changed the title Support installing developmental releases Support requiring from developmental releases Dec 8, 2016
@jaraco
Copy link
Member

jaraco commented Dec 8, 2016

Your usage should work (and has worked for me in the past).

What happens when you run easy_install -i https://INTRA-PYPI/index/+simple/mypackage/ mypackage==1.0.0.dev1? What links appear on that page for mypackage?

@tuukkamustonen
Copy link
Author

Hmm, it's the same output (btw. I'm on 30.2.0):

09:06 $ easy_install -i https://INTRA-PYPI/index/+simple/ mypackage==1.0.0.dev1
Searching for mypackage==1.0.0.dev1
Reading https://INTRA-PYPI/index/+simple/mypackage/
Authenticating as musttu for https://INTRA-PYPI/index/+simple/mypackage/ (from .pypirc)
No local packages or working download links found for mypackage==1.0.0.dev1
error: Could not find suitable distribution for Requirement.parse('mypackage==1.0.0.dev1')

pip install -i https://INTRA-PYPI/index/+simple/ mypackage==1.0.0.dev1 installs the package successfully.

We are running devpi as internal PyPI mirror, do you think there's some conflict with it?

@jaraco
Copy link
Member

jaraco commented Dec 9, 2016

It's working for me.

$ mkdir foo
$ PYTHONPATH=foo easy_install -d foo -i http://localhost:3141/root/dev/+simple/ setuptools==30.3.0.dev1
Creating /Users/jaraco/foo/site.py
Searching for setuptools==30.3.0.dev1
Reading http://localhost:3141/root/dev/+simple/setuptools/
Downloading http://localhost:3141/root/dev/+f/0b3/65769184e5700/setuptools-30.3.0.dev1.zip#sha256=0b365769184e5700f5aff6f0aa60f4474398b5819579a74aa0987b67fc20b26c
Best match: setuptools 30.3.0.dev1
Processing setuptools-30.3.0.dev1.zip
Writing /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/easy_install-58u_nay_/setuptools-30.3.0.dev1/setup.cfg
Running setuptools-30.3.0.dev1/setup.py -q bdist_egg --dist-dir /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/easy_install-58u_nay_/setuptools-30.3.0.dev1/egg-dist-tmp-9q936nxc
warning: no files found matching '*' under directory 'setuptools/_vendor'
Copying setuptools-30.3.0.dev1-py3.6.egg to /Users/jaraco/foo
Adding setuptools 30.3.0.dev1 to easy-install.pth file
Installing easy_install script to foo
Installing easy_install-3.6 script to foo

Installed /Users/jaraco/foo/setuptools-30.3.0.dev1-py3.6.egg
Processing dependencies for setuptools==30.3.0.dev1
Finished processing dependencies for setuptools==30.3.0.dev1

Perhaps there is an issue with the authentication. I notice your output is slightly different from mine.

Authenticating as musttu for https://INTRA-PYPI/index/+simple/mypackage/ (from .pypirc)

I've never used a devpi server which required authentication for reading. Or perhaps the server doesn't require it, but easy_install is assuming it.

I'll need you to do some more investigation and trace the behavior to find where it's failing in your environment.

@tuukkamustonen
Copy link
Author

Thanks. And interesting. Our devpi indeed does not require authentication, but looks like setuptools uses it (from ~/.pypirc) even when reading, if username is set. I don't actually have password set in ~/.pypirc, but that makes no difference, so I assume even though setuptools reports Authenticating as musttu it actually doesn't (because there is no password available, it cannot). So, there's no functional impact in that, but I think that the logging is misleading and should be clarified (in another ticket). Agree?

It seems my problems pour in from something else - I cannot install any in-house packages through easy_install (but can using pip). I'll investigate.

@tuukkamustonen
Copy link
Author

Uhh, how stupid am I? I forgot easy_install does not support wheel packages! Oh jeez...

So, false alarm, I will close this and just stick with pip install -e ..

However, do you want me to open another ticket about this bit below?

Looks like setuptools uses username (from ~/.pypirc) even when reading, if username is set. I don't actually have password set in ~/.pypirc, but that makes no difference, so I assume even though setuptools reports Authenticating as musttu it actually doesn't (because there is no password available, it cannot). So, there's no functional impact in that, but I think that the logging is misleading and should be clarified (in another ticket).

Also, if you omit username from ~/.pypirc then easy_install will log just Authenticating as for ....

@tuukkamustonen
Copy link
Author

And offtopic: any plans to merge pip and easy_install (or rather, pip and setuptools) now that pip is even included in py3 releases?

@jaraco
Copy link
Member

jaraco commented Dec 9, 2016

any plans to merge pip and easy_install

Yes

do you want me to open another ticket about this bit below

Not really, since it doesn't appear to be causing any problems... and will likely be replaced. Thanks.

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

2 participants