It is a bug in nose 1.3.1 and has been fixed for the upcoming release.
./setup.py nosetests error: <some_package>: Not a directory
-
18-06-2023 - |
سؤال
I have a package with the following setup.py
:
from setuptools import find_packages
from setuptools import setup
# Some dependency_links magic
setup(
name='dc-gce',
version='0.0.1',
packages=find_packages(exclude=['tests', 'tests.*']),
dependency_links=dependency_links,
install_requires=[
'google-api-python-client',
'dc-tools>=0.0.1,<0.1.0'
],
tests_require=[
'dc-gae>=0.0.1,<0.1.0',
'httplib2',
'webob'
],
test_suite='tests')
It depends on a package with this setup.py
:
from setuptools import find_packages
from setuptools import setup
setup(
name='dc-tools',
version='0.0.1',
packages=find_packages(exclude=['tests', 'tests.*']),
zip_safe=True,
test_suite='tests')
When I run python setup.py test
in the first package, all dependencies are downloaded and all the tests work fine.
However, when I run python setup.py nosetests
instead, I get this error:
error: <pwd>/dc_tools-0.0.1-py2.7.egg/dc: Not a directory
The dc
directory mentioned is a properly setup namespace in all packages and it does exist in the egg. The egg is zipped though.
I fixed the same issue for the dc-gae
dependency by adding zip_safe=False
to its setup.py
. I don't feel this is a proper fix though.
Edit: I tried python setup.py test
. that worked. I think it's a bug in nose.
المحلول
لا تنتمي إلى StackOverflow