Merge lp:~jonas-drange/js-oopsd/conditional-setuptools-import into lp:js-oopsd

Proposed by Jonas G. Drange
Status: Needs review
Proposed branch: lp:~jonas-drange/js-oopsd/conditional-setuptools-import
Merge into: lp:js-oopsd
Diff against target: 17 lines (+4/-2)
1 file modified
setup.py (+4/-2)
To merge this branch: bzr merge lp:~jonas-drange/js-oopsd/conditional-setuptools-import
Reviewer Review Type Date Requested Status
Ian Booth Pending
Launchpad code reviewers Pending
Review via email: mp+178017@code.launchpad.net

Commit message

consumers of js-oopsd can now use setuptools, if installed, to pull down dependencies listed in install_requires

Description of the change

Proposed fix
importing setuptools if it exists, keep using distutils if not

Pre-implementation notes
Since I have limited knowledge about python distribution I discussed this with a fellow developer and concluded that distutils emits warnings when encountering the install_requires list because it does not know what to do with it. setuptools do know how to deal with install_requires

Implementation
conditional import of setuptools in setup.py

To post a comment you must log in.

Unmerged revisions

14. By Jonas G. Drange

use setuptools if it exists to handle install_requires

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2012-09-09 03:15:40 +0000
3+++ setup.py 2013-08-01 08:33:36 +0000
4@@ -14,9 +14,11 @@
5 #
6 # You should have received a copy of the GNU Affero General Public License
7 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8-
9
10-from distutils.core import setup
11+try:
12+ from setuptools import setup
13+except ImportError:
14+ from distutils.core import setup
15 import os.path
16
17 description = file(

Subscribers

People subscribed via source and target branches

to all changes: