Browse Source

Cleans up following PEP8 rules

Adrien Panay 7 years ago
parent
commit
a35e510edc
1 changed files with 55 additions and 43 deletions
  1. 55 43
      tracim/setup.py

+ 55 - 43
tracim/setup.py View File

@@ -1,24 +1,20 @@
1 1
 # -*- coding: utf-8 -*-
2
-#quickstarted Options:
3
-#
4
-# sqlalchemy: True
5
-# auth:       sqlalchemy
6
-# mako:       True
7
-#
8
-#
2
+# quickstarted Options:
3
+#  sqlalchemy: True
4
+#  auth:       sqlalchemy
5
+#  mako:       True
6
+
7
+import sys
9 8
 
10 9
 from setuptools.command.develop import develop
11
-#This is just a work-around for a Python2.7 issue causing
12
-#interpreter crash at exit when trying to log an info message.
10
+# This is just a work-around for a Python2.7 issue causing
11
+# interpreter crash at exit when trying to log an info message.
13 12
 try:
14 13
     import logging
15 14
     import multiprocessing
16 15
 except:
17 16
     pass
18 17
 
19
-import sys
20
-py_version = sys.version_info[:2]
21
-
22 18
 try:
23 19
     from setuptools import setup, find_packages
24 20
 except ImportError:
@@ -26,9 +22,17 @@ except ImportError:
26 22
     use_setuptools()
27 23
     from setuptools import setup, find_packages
28 24
 
25
+py_version = sys.version_info[:2]
26
+
27
+DESCRIPTION = ('Tracim is a plateform software designed to improve '
28
+               'traceability and productivity in collaborative work.')
29
+
29 30
 
30 31
 class DevelopWithCompileCatalog(develop):
32
+    """Extend base develop setup.py command."""
33
+
31 34
     def run(self):
35
+        """Compiles binary translation files from catalog."""
32 36
         from babel.messages.frontend import compile_catalog
33 37
         compiler = compile_catalog(self.distribution)
34 38
         option_dict = self.distribution.get_option_dict('compile_catalog')
@@ -37,36 +41,38 @@ class DevelopWithCompileCatalog(develop):
37 41
         compiler.run()
38 42
         super().run()
39 43
 
44
+
40 45
 classifiers = [
41
-    "License :: OSI Approved :: GNU Affero General Public License v3",
42
-    "Programming Language :: Python",
43
-    "Programming Language :: Python :: 3.4",
44
-    "Programming Language :: Python :: 3.5",
45
-    "Programming Language :: Python :: 3.6",
46
+    'License :: OSI Approved :: GNU Affero General Public License v3',
47
+    'Programming Language :: Python',
48
+    'Programming Language :: Python :: 3.4',
49
+    'Programming Language :: Python :: 3.5',
50
+    'Programming Language :: Python :: 3.6',
46 51
 ]
47 52
 
48
-testpkgs=['WebTest >= 1.2.3',
49
-               'nose',
50
-               'coverage',
51
-               'gearbox'
52
-               ]
53
+testpkgs = [
54
+    'WebTest >= 1.2.3',
55
+    'nose',
56
+    'coverage',
57
+    'gearbox'
58
+]
53 59
 
54
-install_requires=[
55
-    "TurboGears2==2.3.7",
56
-    "Genshi",
57
-    "Mako",
58
-    "zope.sqlalchemy >= 0.4",
59
-    "sqlalchemy",
60
-    "alembic",
61
-    "repoze.who",
62
-    "who_ldap>=3.2.1",
63
-    "python-ldap-test==0.2.1",
64
-    "unicode-slugify==0.1.3",
65
-    "pytz==2014.7",
60
+install_requires = [
61
+    'TurboGears2==2.3.7',
62
+    'Genshi',
63
+    'Mako',
64
+    'zope.sqlalchemy >= 0.4',
65
+    'sqlalchemy',
66
+    'alembic',
67
+    'repoze.who',
68
+    'who_ldap>=3.2.1',
69
+    'python-ldap-test==0.2.1',
70
+    'unicode-slugify==0.1.3',
71
+    'pytz==2014.7',
66 72
     'rq==0.7.1',
67 73
     'filedepot>=0.5.0',
68 74
     'preview-generator'
69
-    ]
75
+]
70 76
 
71 77
 setup_requires = [
72 78
     'babel',
@@ -75,7 +81,7 @@ setup_requires = [
75 81
 setup(
76 82
     name='tracim',
77 83
     version='1.0.0',
78
-    description='Tracim is plateform software designed to improve traceability and productivity in collaborative work.',
84
+    description=DESCRIPTION,
79 85
     author='Damien ACCORSI',
80 86
     author_email='damien.accorsi@free.fr',
81 87
     url='https://github.com/tracim/tracim',
@@ -84,14 +90,20 @@ setup(
84 90
     include_package_data=True,
85 91
     test_suite='nose.collector',
86 92
     tests_require=testpkgs,
87
-    package_data={'tracim': ['i18n/*/LC_MESSAGES/*.mo',
88
-                                 'templates/*/*',
89
-                                 'public/*/*']},
90
-    message_extractors={'tracim': [
93
+    package_data={
94
+        'tracim': [
95
+            'i18n/*/LC_MESSAGES/*.mo',
96
+            'templates/*/*',
97
+            'public/*/*',
98
+        ]
99
+    },
100
+    message_extractors={
101
+        'tracim': [
91 102
             ('**.py', 'python', None),
92 103
             ('templates/**.mak', 'mako', {'input_encoding': 'utf-8'}),
93
-            ('public/**', 'ignore', None)]},
94
-
104
+            ('public/**', 'ignore', None)
105
+        ]
106
+    },
95 107
     entry_points={
96 108
         'paste.app_factory': [
97 109
             'main = tracim.config.middleware:make_app'
@@ -108,7 +120,7 @@ setup(
108 120
     },
109 121
     dependency_links=[
110 122
         'http://github.com/algoo/preview-generator/tarball/master#egg=preview_generator-1.0',
111
-        ],
123
+    ],
112 124
     zip_safe=False,
113 125
     cmdclass={
114 126
         'develop': DevelopWithCompileCatalog,