Browse Source

Add setup script

tags/v0.1.1^0
Chris Smith 7 years ago
parent
commit
a2bc48df2c
4 changed files with 66 additions and 1 deletions
  1. 3
    0
      .gitignore
  2. 0
    0
      docker_rerun.py
  3. 62
    0
      setup.py
  4. 1
    1
      test.py

+ 3
- 0
.gitignore View File

@@ -1 +1,4 @@
1 1
 /__pycache__
2
+/build
3
+/dist
4
+/*.egg-info/**

docker-rerun → docker_rerun.py View File


+ 62
- 0
setup.py View File

@@ -0,0 +1,62 @@
1
+"""Setuptools based setup module for docker-rerun."""
2
+
3
+from setuptools import setup, find_packages
4
+from os import path
5
+
6
+here = path.abspath(path.dirname(__file__))
7
+
8
+setup(
9
+    name='docker-rerun',
10
+
11
+    version='0.1.1',
12
+
13
+    description='Command-line tool to re-run a docker container',
14
+    long_description='docker-rerun is a small utility script that makes it ' \
15
+                     'easy to re-run docker containers using the same ' \
16
+                     'arguments you used previously.' \
17
+                     '\n\n' \
18
+                     'Want to update to a newer image, or add a missing port ' \
19
+                     'publication? docker-rerun’s got you covered.' \
20
+                     '\n\n' \
21
+                     'See the GitHub project_ for more info.' \
22
+                     '\n\n' \
23
+                     '.. _project: https://github.com/csmith/docker-rerun',
24
+
25
+    url='https://github.com/csmith/docker-rerun',
26
+
27
+    author='Chris Smith',
28
+    author_email='chris87@gmail.com',
29
+
30
+    license='MIT',
31
+
32
+    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
33
+    classifiers=[
34
+        'Development Status :: 4 - Beta',
35
+        'Intended Audience :: Developers',
36
+        'Intended Audience :: System Administrators',
37
+        'License :: OSI Approved :: MIT License',
38
+        'Programming Language :: Python :: 3 :: Only',
39
+        'Topic :: System :: Systems Administration',
40
+        'Topic :: Utilities',
41
+    ],
42
+
43
+    keywords='docker container',
44
+
45
+    py_modules=["docker_rerun"],
46
+
47
+    install_requires=[],
48
+
49
+    test_suite='nose.collector',
50
+
51
+    extras_require={
52
+        'dev': [],
53
+        'test': ['coverage', 'nose', 'pylint'],
54
+    },
55
+
56
+    entry_points={
57
+        'console_scripts': [
58
+            'docker-rerun=docker_rerun:main',
59
+        ],
60
+    },
61
+)
62
+

+ 1
- 1
test.py View File

@@ -75,7 +75,7 @@ def test_modifiers():
75 75
 @with_setup(setup_each, teardown_each)
76 76
 def check(command, args=[], expected=None):
77 77
     _run(command)
78
-    output = subprocess.check_output(['./docker-rerun', '--dry-run', 'test123'] + args)
78
+    output = subprocess.check_output(['./docker_rerun.py', '--dry-run', 'test123'] + args)
79 79
     output = output.decode('utf-8').strip().splitlines()
80 80
     expected = ' '.join(expected or command)
81 81
     assert output[3] == expected, 'Expected "%s" but got "%s"' % (expected, output[3])

Loading…
Cancel
Save