[Distutils] Package a project

Imran M Yousuf imran at smitsol.com
Mon Dec 2 08:53:25 CET 2013


Hi,

I am new to setuptools. I am using it to build and package a project
of mine. Currently if I execute `python setup.py bdist` it generates a
tarball with all files located in paths
'./abs/path/to/project/bin/[entry points]' and
'./abs/path/to/project/lib/python-2.7/site-packages/[rest of the
sources]'. This does not seem to be logical :(, I would rather want
the binary distribution to be structure -
'./project-name/bin/' and './project-name/lib/'.

Can some please advise me how to achieve it? I am using VirtualEnv for
development of this project and its setup.py looks like -

from setuptools import setup, find_packages

setup(name='project-name',
      version='1.0',
      description='Description',
      author='Imran M Yousuf',
      author_email='imran at smitsol.com',
      url='http://www.smitsol.com',
      install_requires = ['setuptools', 'pycrypto==2.6'],
      packages=find_packages('src', ["tests"]),
          package_dir={'': 'src'},
          test_suite="tests",
      entry_points={
          'console_scripts': ['manager=client.manager:main']
      }
     )

Thank you,

-- 
Imran M Yousuf
Entrepreneur & CEO
Smart IT Solution
http://smitsol.com
25/5B, Block F, Haji Chinu Miah Road Bylane
Joint Quarter, Mohammadpur
Dhaka - 1207, Bangladesh
Email: imran at smitsol.com
Twitter: @imyousuf - http://twitter.com/imyousuf
Skype: imyousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
           +880-1746119494


More information about the Distutils-SIG mailing list