I'm packaging my project via setup.py of a following structure:
import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "blah",
version = "0.0.1",
author = "Chuck Norris",
author_email = "xyz@gmail.com",
description = ("blah blah blah."),
license = "BSD",
keywords = "django",
url = "http://packages.python.org/blah",
packages=['blah'],
long_description=read('README'),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Utilities",
"License :: OSI Approved :: BSD License",
],
)
My directory structure is
folder/
--blah/__init__.py
--blah/other stuff
--readme
--setup.py
When installing the .egg with pip, I get error IOError: [Errno 2] No such file or directory: '/tmp/pip-Us23IZ-build/setup.py'
.
When unzipped, egg does not contain setup.py, indeed. I'm not sure whether it should, or not, or is it of any relevance to the error at all.
Thanks.
It is likely, you have
setup.py
in wrong directory.Proper directory structure is:
Packaging (calling the
setup.py
to build an egg or other distribution package) shall be done from projectroot.After creation of the egg file, you shall visit it (the egg file is zip archive) and check, if
setup.py
is present.