summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.cfg2
-rw-r--r--setup.py41
-rw-r--r--setup_helper.py17
-rw-r--r--tasks.py5
4 files changed, 33 insertions, 32 deletions
diff --git a/setup.cfg b/setup.cfg
index 2abe6f02..607805ae 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,6 +5,6 @@ universal = 1
omit = paramiko/_winapi.py
[flake8]
-exclude = sites,.git,build,dist,alt_env,appveyor
+exclude = sites,.git,build,dist,alt_env,appveyor,demos,tests,paramiko,test.py
ignore = E124,E125,E128,E261,E301,E302,E303
max-line-length = 79
diff --git a/setup.py b/setup.py
index 2e0d4041..80d5ea7f 100644
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,13 @@
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA.
+import sys
+from setuptools import setup
+
+if sys.platform == 'darwin':
+ import setup_helper
+
+ setup_helper.install_custom_make_tarball()
longdesc = '''
This is a library for making SSH2 connections (client or server).
@@ -30,14 +37,6 @@ To install the development version, ``pip install -e
git+https://github.com/paramiko/paramiko/#egg=paramiko``.
'''
-import sys
-from setuptools import setup
-
-
-if sys.platform == 'darwin':
- import setup_helper
- setup_helper.install_custom_make_tarball()
-
# Version info -- read without importing
_locals = {}
@@ -45,22 +44,22 @@ with open('paramiko/_version.py') as fp:
exec(fp.read(), None, _locals)
version = _locals['__version__']
-
setup(
- name = "paramiko",
- version = version,
- description = "SSH2 protocol library",
- long_description = longdesc,
- author = "Jeff Forcier",
- author_email = "jeff@bitprophet.org",
- url = "https://github.com/paramiko/paramiko/",
- packages = [ 'paramiko' ],
- license = 'LGPL',
- platforms = 'Posix; MacOS X; Windows',
- classifiers = [
+ name="paramiko",
+ version=version,
+ description="SSH2 protocol library",
+ long_description=longdesc,
+ author="Jeff Forcier",
+ author_email="jeff@bitprophet.org",
+ url="https://github.com/paramiko/paramiko/",
+ packages=['paramiko'],
+ license='LGPL',
+ platforms='Posix; MacOS X; Windows',
+ classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
- 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
+ 'License :: OSI Approved :: '
+ 'GNU Library or Lesser General Public License (LGPL)',
'Operating System :: OS Independent',
'Topic :: Internet',
'Topic :: Security :: Cryptography',
diff --git a/setup_helper.py b/setup_helper.py
index 9e3834b3..c359a16c 100644
--- a/setup_helper.py
+++ b/setup_helper.py
@@ -77,7 +77,7 @@ def make_tarball(base_name, base_dir, compress='gzip', verbose=0, dry_run=0,
For 'gzip' and 'bzip2' the internal tarfile module will be used.
For 'compress' the .tar will be created using tarfile, and then
we will spawn 'compress' afterwards.
- The output tar file will be named 'base_name' + ".tar",
+ The output tar file will be named 'base_name' + ".tar",
possibly plus the appropriate compression extension (".gz",
".bz2" or ".Z"). Return the output filename.
"""
@@ -87,12 +87,14 @@ def make_tarball(base_name, base_dir, compress='gzip', verbose=0, dry_run=0,
# "create a tree of hardlinks" step! (Would also be nice to
# detect GNU tar to use its 'z' option and save a step.)
- compress_ext = { 'gzip': ".gz",
- 'bzip2': '.bz2',
- 'compress': ".Z" }
+ compress_ext = {
+ 'gzip': ".gz",
+ 'bzip2': '.bz2',
+ 'compress': ".Z",
+ }
# flags for compression program, each element of list will be an argument
- tarfile_compress_flag = {'gzip':'gz', 'bzip2':'bz2'}
+ tarfile_compress_flag = {'gzip': 'gz', 'bzip2': 'bz2'}
compress_flags = {'compress': ["-f"]}
if compress is not None and compress not in compress_ext.keys():
@@ -144,11 +146,10 @@ def make_tarball(base_name, base_dir, compress='gzip', verbose=0, dry_run=0,
_custom_formats = {
'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
- 'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"),
- 'tar': (make_tarball, [('compress', None)], "uncompressed tar file"),
+ 'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"),
+ 'tar': (make_tarball, [('compress', None)], "uncompressed tar file"),
}
# Hack in and insert ourselves into the distutils code base
def install_custom_make_tarball():
distutils.archive_util.ARCHIVE_FORMATS.update(_custom_formats)
-
diff --git a/tasks.py b/tasks.py
index 41df8b27..42c18bd0 100644
--- a/tasks.py
+++ b/tasks.py
@@ -1,4 +1,3 @@
-from os import mkdir
from os.path import join
from shutil import rmtree, copytree
@@ -41,7 +40,9 @@ def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False):
# Publish
publish(ctx, sdist=sdist, wheel=wheel, sign=sign, dry_run=dry_run)
# Remind
- print("\n\nDon't forget to update RTD's versions page for new minor releases!")
+ print("\n\nDon't forget to update RTD's versions page for new minor "
+ "releases!")
+
# TODO: "replace one task with another" needs a better public API, this is
# using unpublished internals & skips all the stuff add_task() does re: