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

setuptools fails to install unittest2 with test_requires on Windows #99

Open
anthrotype opened this issue Aug 21, 2016 · 0 comments
Open

Comments

@anthrotype
Copy link

Hi,

I hope this is the right place. The pypi page of unittest2 links to https://code.google.com/archive/p/unittest-ext/issues as the official issue tracker for unittest2, however it seems I can't open new issues there.

So, I specified unittest2 in test_requires in my setup.py script:
https://github.com/anthrotype/pyclipper/blob/setuptools_scm/setup.py

So that I can do python setup.py test and setuptools fetches the dependencies automatically.
However, this doesn't seem to be working on windows:

https://ci.appveyor.com/project/greginvm/pyclipper/build/1.0.13/job/9blrl0jsss9mlfee

Searching for unittest2
Reading https://pypi.python.org/simple/unittest2/
Downloading https://pypi.python.org/packages/7f/c4/2b0e2d185d9d60772c10350d9853646832609d2f299a8300ab730f199db4/unittest2-1.1.0.tar.gz#md5=f72dae5d44f091df36b6b513305ea000
Best match: unittest2 1.1.0
Processing unittest2-1.1.0.tar.gz
Writing C:\Users\appveyor\AppData\Local\Temp\1\easy_install-jghc14us\unittest2-1.1.0\setup.cfg
Running unittest2-1.1.0\setup.py -q bdist_egg --dist-dir C:\Users\appveyor\AppData\Local\Temp\1\easy_install-jghc14us\unittest2-1.1.0\egg-dist-tmp-qd208dqq
error: Setup script exited with error: [Errno 2] No such file or directory: 'build\\bdist.win32\\egg\\pbr\\tests\\testpackage\\pbr_testpackage\\__pycache__\\extra.cpython-35.pyc.96134832'
Command exited with code 1

I believe this is the same issue as https://code.google.com/archive/p/unittest-ext/issues/95

BTW, the same thing does work on Linux and Mac as you can see from the Travis log:
https://travis-ci.org/anthrotype/pyclipper/builds/153916239

I can work around it by having pip install unittest2 before I do python setup.py test. In this case, pip download the pre-compiled wheel for unittest2, whereas in the case of setuptools, the latter tries to create an egg from the sdist which is on PyPI, and fails.

I'm not sure if this is a unittest2 issue or a setuptools issue, or both.
But it would nice to being able to specify unittest2 as a test_requires and have it work on both Windows and Unix.

Thanks.

Cosimo

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

1 participant