Fork the repo and clone the fork into PipDiff:
git clone [email protected]:littlepea/pipdiff.git PipDiff
Test that the utility is working:
cd pipdiff/ ./pipdiff.py Django==1.4.5 PyPI:Django==1.5 Pillow==2.0.0 South==0.7.6 Unidecode==0.04.12 amqp==1.0.8 PyPI:amqp==1.0.10 ...
Setup a proper directory structure for the package:
PipDiff/ pipdiff/ __init__.py pipdiff.py README.md
In pipdiff.py wrap the code into main() function and at the end add:
if __name__ == '__main__': main()
Copy LICENSE, MANIFEST.in, .gitignore, setup.py, bootstrap.py, buildout.cfg from https://github.com/srid/modern-package-template into PipDiff
In buildout.cfg set:
eggs = pipdiff
In setup.py set:
name='pipdiff', description="View a summary list of package release differences between your local environment and PyPI.", author='Evgeny Demchenko', author_email='[email protected]', url='https://github.com/ogt/pipdiff', license='BSD', entry_points={ 'console_scripts': ['pipdiff.pipdiff:main'] }
entry_points are to make sure pipdiff will be in the bin/ available for execution after installation.
Test that it's installable by pip:
$ pip install -e PipDiff/ Obtaining file:///home/slam/workspace/PipDiff Running setup.py egg_info for package from file:///home/slam/workspace/PipDiff Installing collected packages: pipdiff Running setup.py develop for pipdiff Creating /home/slam/.virtualenvs/cms/lib/python2.7/site-packages/pipdiff.egg-link (link to .) pipdiff 0.1 is already the active version in easy-install.pth Installing pipdiff script to /home/slam/.virtualenvs/cms/bin Installed /home/slam/workspace/PipDiff Successfully installed pipdiff Cleaning up...
Test that it's executable:
$ pipdiff Django==1.4.5 PyPI:Django==1.5 Pillow==2.0.0 South==0.7.6 Unidecode==0.04.12 amqp==1.0.8 PyPI:amqp==1.0.10 ...
10. Register on PyPI (you need to have an account):
python setup.py register
11. Upload the code to PyPI:
python setup.py sdist upload
12. Remove local version and test the PyPI installation:
pip uninstall pipdiff pip install pipdiff
- Success!
More info here: http://guide.python-distribute.org/quickstart.html