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
 # -*- coding: utf-8 -*-
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
 from setuptools.command.develop import develop
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
 try:
12
 try:
14
     import logging
13
     import logging
15
     import multiprocessing
14
     import multiprocessing
16
 except:
15
 except:
17
     pass
16
     pass
18
 
17
 
19
-import sys
20
-py_version = sys.version_info[:2]
21
-
22
 try:
18
 try:
23
     from setuptools import setup, find_packages
19
     from setuptools import setup, find_packages
24
 except ImportError:
20
 except ImportError:
26
     use_setuptools()
22
     use_setuptools()
27
     from setuptools import setup, find_packages
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
 class DevelopWithCompileCatalog(develop):
31
 class DevelopWithCompileCatalog(develop):
32
+    """Extend base develop setup.py command."""
33
+
31
     def run(self):
34
     def run(self):
35
+        """Compiles binary translation files from catalog."""
32
         from babel.messages.frontend import compile_catalog
36
         from babel.messages.frontend import compile_catalog
33
         compiler = compile_catalog(self.distribution)
37
         compiler = compile_catalog(self.distribution)
34
         option_dict = self.distribution.get_option_dict('compile_catalog')
38
         option_dict = self.distribution.get_option_dict('compile_catalog')
37
         compiler.run()
41
         compiler.run()
38
         super().run()
42
         super().run()
39
 
43
 
44
+
40
 classifiers = [
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
     'rq==0.7.1',
72
     'rq==0.7.1',
67
     'filedepot>=0.5.0',
73
     'filedepot>=0.5.0',
68
     'preview-generator'
74
     'preview-generator'
69
-    ]
75
+]
70
 
76
 
71
 setup_requires = [
77
 setup_requires = [
72
     'babel',
78
     'babel',
75
 setup(
81
 setup(
76
     name='tracim',
82
     name='tracim',
77
     version='1.0.0',
83
     version='1.0.0',
78
-    description='Tracim is plateform software designed to improve traceability and productivity in collaborative work.',
84
+    description=DESCRIPTION,
79
     author='Damien ACCORSI',
85
     author='Damien ACCORSI',
80
     author_email='damien.accorsi@free.fr',
86
     author_email='damien.accorsi@free.fr',
81
     url='https://github.com/tracim/tracim',
87
     url='https://github.com/tracim/tracim',
84
     include_package_data=True,
90
     include_package_data=True,
85
     test_suite='nose.collector',
91
     test_suite='nose.collector',
86
     tests_require=testpkgs,
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
             ('**.py', 'python', None),
102
             ('**.py', 'python', None),
92
             ('templates/**.mak', 'mako', {'input_encoding': 'utf-8'}),
103
             ('templates/**.mak', 'mako', {'input_encoding': 'utf-8'}),
93
-            ('public/**', 'ignore', None)]},
94
-
104
+            ('public/**', 'ignore', None)
105
+        ]
106
+    },
95
     entry_points={
107
     entry_points={
96
         'paste.app_factory': [
108
         'paste.app_factory': [
97
             'main = tracim.config.middleware:make_app'
109
             'main = tracim.config.middleware:make_app'
108
     },
120
     },
109
     dependency_links=[
121
     dependency_links=[
110
         'http://github.com/algoo/preview-generator/tarball/master#egg=preview_generator-1.0',
122
         'http://github.com/algoo/preview-generator/tarball/master#egg=preview_generator-1.0',
111
-        ],
123
+    ],
112
     zip_safe=False,
124
     zip_safe=False,
113
     cmdclass={
125
     cmdclass={
114
         'develop': DevelopWithCompileCatalog,
126
         'develop': DevelopWithCompileCatalog,