Skip to content

Commit

Permalink
Fix setup.py (good for PyPi)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron O'Mullan committed Aug 24, 2013
1 parent 3ab344a commit 76d04ec
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

50 changes: 34 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# Setup file for dulwich_paramiko

try:
from setuptools import setup, Extension
Expand All @@ -8,24 +7,43 @@
from distutils.core import setup, Extension
has_setuptools = False

version_string = '0.1.1'
version_string = '0.2.0'


setup_kwargs = {}

# Requirements
install_requires = [
# PyPi
'paramiko==1.10.0',
'pycrypto==2.6',

# Non PyPi
'dulwich',
'funky',
'mimer',
]
dependency_links = [
'https://github.com/AaronO/dulwich/tarball/dd274cf023593dd8ed76de0bcc86f19ffc2a0167#egg=dulwich-0.9.1',
'https://github.com/FriendCode/funky/tarball/e89cb2ce4374bf2069c7f669e52e046f63757241#egg=funky-0.0.1',
'https://github.com/FriendCode/mimer/tarball/a812e5f631b9b5c969df5a2ea84b635490a96ced#egg=mimer-0.0.1',
]

setup(name='gittle',
description='A high level pure python git implementation',
keywords='git dulwich pure python gittle',
version=version_string,
url='https://github.com/FriendCode/gittle',
license='MIT',
author="Aaron O'Mullan",
author_email='[email protected]',
long_description="""
Gittle is a wrapper around dulwich. It provides an easy and familiar interface to git.
It's pure python (no dependancy on the git binary) and has no other dependancies besides
the python stdlib, dulwich and paramiko (optional).
""",
packages=['gittle', 'gittle.utils'],
**setup_kwargs
description='A high level pure python git implementation',
keywords='git dulwich pure python gittle',
version=version_string,
url='https://github.com/FriendCode/gittle',
license='MIT',
author="Aaron O'Mullan",
author_email='[email protected]',
long_description="""
Gittle is a wrapper around dulwich. It provides an easy and familiar interface to git.
It's pure python (no dependancy on the git binary) and has no other dependancies besides
the python stdlib, dulwich and paramiko (optional).
""",
packages=['gittle', 'gittle.utils'],
install_requires=install_requires,
dependency_links=dependency_links,
**setup_kwargs
)

2 comments on commit 76d04ec

@calmrat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat trick! assuming my guess that it essentially this allows pip/easy_install to automatically install all deps for you, yea? i'm going to pick this up and try it myself!

http://stackoverflow.com/questions/3472430/how-can-i-make-setuptools-install-a-package-thats-not-on-pypi

@AaronO
Copy link
Contributor

@AaronO AaronO commented on 76d04ec Aug 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one key thing that isn't mentioned anywhere, is that by specifying dependency_links you are basically providing other means for setup.py to find packages, you still need to add them as dependencies in install_requires.

So you just need to be aware of that. But it is indeed quite a neat way to do so.

I still would prefer to have all the packages on PyPi but my Pull Request for my dulwich improvements hasn't yet been merged, so this works well for now :)

Please sign in to comment.