Reputation: 47374
I created package on pypi.python.org via setup.py of a following structure:
from setuptools import setup, find_packages
setup(
name='my_project',
version='1.0.0',
packages=find_packages(),
long_description='My project',
package_data={
"MyProject.libraries": [
"darwin/lib.so",
"linux/lib.so",
"windows/lib.pyd",
],
},
)
My directory structure is
myproject/
--libraries/
----__init__.py
----darwin/
------lib.so
----linux/
------lib.so
----windows/
------lib.pyd
readme
setup.py
other files
When installing with pip:
pip install my_project
I get error
Failed building wheel for myproject
Running setup.py clean for myproject
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-fsZH4w/myproject/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" clean --all:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/private/tmp/pip-build-fsZH4w/myproject/setup.py'
But package installed and working fine.
I found similar question pip installation throws IOerror - no setup.py but my setup.py is in root package directory, so I don't think it is the same problem.
Upvotes: 2
Views: 1442
Reputation: 50
Looks like it's about naming conventions which have following rules
Here is the sample structure for python package
uniq_package/
uniq_package/
__init__.py
linux/
lib.so
darwin/
lib.so
windows/
lib.pyd
setup.py
Upvotes: 1