Introduction To Python - Learn Python the hard way v2.0
Title: Exercise 46
prasad@pjoshi:~/programs/python/diy/ex-46/projects/skeleton$ ls -ltR
.:
total 20
drwxrwxr-x 2 prasad prasad 4096 2011-12-12 11:18 tests
drwxrwxr-x 2 prasad prasad 4096 2011-12-12 11:17 NAME
-rw-rw-r-- 1 prasad prasad 421 2011-12-12 11:13 setup.py
drwxrwxr-x 2 prasad prasad 4096 2011-12-12 11:12 bin
drwxrwxr-x 2 prasad prasad 4096 2011-12-12 11:12 docs
./tests:
total 12
-rw-rw-r-- 1 prasad prasad 797 2011-12-12 11:18 NAME_tests.pyc
-rw-rw-r-- 1 prasad prasad 148 2011-12-12 11:18 NAME_tests.py
-rw-rw-r-- 1 prasad prasad 161 2011-12-12 11:17 __init__.pyc
-rw-rw-r-- 1 prasad prasad 0 2011-12-12 11:12 __init__.py
./NAME:
total 4
-rw-rw-r-- 1 prasad prasad 160 2011-12-12 11:17 __init__.pyc
-rw-rw-r-- 1 prasad prasad 0 2011-12-12 11:12 __init__.py
./bin:
total 0
./docs:
total 0
### EXTRA CREDITS ###
- the setup script may be run multiple times
- Distutils use setup.py (setup file) to install Python packages
### USING setup.py sdist ###
prasad@pjoshi:~/programs/python/diy/ex-46/projects/skeleton$ ls
bin docs NAME setup.py tests
prasad@pjoshi:~/programs/python/diy/ex-46/projects/skeleton$ python setup.py sdist
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running sdist
running check
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)
warning: sdist: standard file not found: should have one of README, README.txt
writing manifest file 'MANIFEST'
creating projectname-0.1
creating projectname-0.1/NAME
making hard links in projectname-0.1...
hard linking setup.py -> projectname-0.1
hard linking NAME/__init__.py -> projectname-0.1/NAME
creating dist
Creating tar archive
removing 'projectname-0.1' (and everything under it)
prasad@pjoshi:~/programs/python/diy/ex-46/projects/skeleton$ ls
bin dist docs MANIFEST NAME setup.py tests
prasad@pjoshi:~/programs/python/diy/ex-46/projects/skeleton$ ls -l dist/
total 4
-rw-rw-r-- 1 prasad prasad 598 2011-12-12 12:58 projectname-0.1.tar.gz
http://docs.python.org/distutils/introduction.html#distutils-simple-example
