leichongxiang / sshpt

Automatically exported from code.google.com/p/sshpt
0 stars 0 forks source link

sshpt requires setuptools (with patch) #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to install sshpt on a system without setuptools it fails for 
obvious reasons.

Here's a patch that fixes it, while still using setuptools where available:

--- setup.py.o  2012-03-28 15:55:34.000000000 +0100
+++ setup.py    2012-03-28 16:17:16.000000000 +0100
@@ -1,9 +1,15 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-

-from setuptools import setup, find_packages
 import sys, os

+try:
+    from setuptools import setup, find_packages
+    pkgs_provided = find_packages(exclude=['ez_setup', 'examples', 'tests'])
+except ImportError:
+    from distutils.core import setup
+    pkgs_provided = []
+
 version = '1.2.0'

 setup(name = 'sshpt',
@@ -24,7 +30,7 @@
       author = 'Dan McDougall',
       author_email = 'YouKnowWho@YouKnowWhat.com',
       url = 'http://code.google.com/p/sshpt/',
-      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
+      packages = pkgs_provided
       install_requires=[
         "paramiko>=1.7.0",
       ],

Original issue reported on code.google.com by e.yunak on 28 Mar 2012 at 3:17