|
0 |
From: Michael R. Crusoe <michael.crusoe@gmail.com>
|
|
1 |
Subject: Add setup.py
|
|
2 |
--- ctdconverter.orig/convert.py
|
|
3 |
+++ ctdconverter/convert.py
|
|
4 |
@@ -8,7 +8,7 @@
|
|
5 |
from common.exceptions import ApplicationException, ModelError
|
|
6 |
|
|
7 |
__all__ = []
|
|
8 |
-__version__ = 2.0
|
|
9 |
+__version__ = '2.0'
|
|
10 |
__date__ = '2014-09-17'
|
|
11 |
__updated__ = '2017-08-09'
|
|
12 |
|
|
13 |
@@ -269,4 +269,4 @@
|
|
14 |
|
|
15 |
|
|
16 |
if __name__ == "__main__":
|
|
17 |
- sys.exit(main())
|
|
18 |
\ No newline at end of file
|
|
19 |
+ sys.exit(main())
|
|
20 |
--- /dev/null
|
|
21 |
+++ ctdconverter/setup.py
|
|
22 |
@@ -0,0 +1,171 @@
|
|
23 |
+"""A setuptools based setup module.
|
|
24 |
+
|
|
25 |
+See:
|
|
26 |
+https://packaging.python.org/en/latest/distributing.html
|
|
27 |
+https://github.com/pypa/sampleproject
|
|
28 |
+"""
|
|
29 |
+
|
|
30 |
+# Always prefer setuptools over distutils
|
|
31 |
+from setuptools import setup, find_packages
|
|
32 |
+# To use a consistent encoding
|
|
33 |
+from codecs import open
|
|
34 |
+from os import path
|
|
35 |
+import re
|
|
36 |
+
|
|
37 |
+here = path.abspath(path.dirname(__file__))
|
|
38 |
+
|
|
39 |
+# Get the long description from the README file
|
|
40 |
+with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
41 |
+ long_description = f.read()
|
|
42 |
+
|
|
43 |
+def read(*parts):
|
|
44 |
+ with open(path.join(here, *parts), 'r') as fp:
|
|
45 |
+ return fp.read()
|
|
46 |
+
|
|
47 |
+def find_version(*file_paths):
|
|
48 |
+ version_file = read(*file_paths)
|
|
49 |
+ version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
|
|
50 |
+ version_file, re.M)
|
|
51 |
+ if version_match:
|
|
52 |
+ return version_match.group(1)
|
|
53 |
+ raise RuntimeError("Unable to find version string.")
|
|
54 |
+
|
|
55 |
+# Arguments marked as "Required" below must be included for upload to PyPI.
|
|
56 |
+# Fields marked as "Optional" may be commented out.
|
|
57 |
+
|
|
58 |
+setup(
|
|
59 |
+ # This is the name of your project. The first time you publish this
|
|
60 |
+ # package, this name will be registered for you. It will determine how
|
|
61 |
+ # users can install this project, e.g.:
|
|
62 |
+ #
|
|
63 |
+ # $ pip install sampleproject
|
|
64 |
+ #
|
|
65 |
+ # And where it will live on PyPI: https://pypi.org/project/sampleproject/
|
|
66 |
+ name='ctdconverter', # Required
|
|
67 |
+
|
|
68 |
+ # Versions should comply with PEP 440:
|
|
69 |
+ # https://www.python.org/dev/peps/pep-0440/
|
|
70 |
+ #
|
|
71 |
+ # For a discussion on single-sourcing the version across setup.py and the
|
|
72 |
+ # project code, see
|
|
73 |
+ # https://packaging.python.org/en/latest/single_source_version.html
|
|
74 |
+ version=find_version("convert.py"), # Required
|
|
75 |
+
|
|
76 |
+ # This is a one-line description or tagline of what your project does. This
|
|
77 |
+ # corresponds to the "Summary" metadata field:
|
|
78 |
+ # https://packaging.python.org/specifications/core-metadata/#summary
|
|
79 |
+ description='Convert CTD files into Galaxy tool and CWL CommandLineTool files', # Required
|
|
80 |
+
|
|
81 |
+ # This is an optional longer description of your project that represents
|
|
82 |
+ # the body of text which users will see when they visit PyPI.
|
|
83 |
+ #
|
|
84 |
+ # Often, this is the same as your README, so you can just read it in from
|
|
85 |
+ # that file directly (as we have already done above)
|
|
86 |
+ #
|
|
87 |
+ # This field corresponds to the "Description" metadata field:
|
|
88 |
+ # https://packaging.python.org/specifications/core-metadata/#description-optional
|
|
89 |
+ long_description=long_description, # Optional
|
|
90 |
+
|
|
91 |
+ # This should be a valid link to your project's main homepage.
|
|
92 |
+ #
|
|
93 |
+ # This field corresponds to the "Home-Page" metadata field:
|
|
94 |
+ # https://packaging.python.org/specifications/core-metadata/#home-page-optional
|
|
95 |
+ url='https://github.com/WorkflowConversion/CTDConverter', # Optional
|
|
96 |
+
|
|
97 |
+ # This should be your name or the name of the organization which owns the
|
|
98 |
+ # project.
|
|
99 |
+ author='The WorkflowConversion team', # Optional
|
|
100 |
+
|
|
101 |
+ # This should be a valid email address corresponding to the author listed
|
|
102 |
+ # above.
|
|
103 |
+ # author_email='authors@example.com', # Optional
|
|
104 |
+
|
|
105 |
+ # Classifiers help users find your project by categorizing it.
|
|
106 |
+ #
|
|
107 |
+ # For a list of valid classifiers, see
|
|
108 |
+ # https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
109 |
+ classifiers=[ # Optional
|
|
110 |
+ # How mature is this project? Common values are
|
|
111 |
+ # 3 - Alpha
|
|
112 |
+ # 4 - Beta
|
|
113 |
+ # 5 - Production/Stable
|
|
114 |
+ 'Development Status :: 3 - Alpha',
|
|
115 |
+
|
|
116 |
+ # Indicate who your project is intended for
|
|
117 |
+ 'Intended Audience :: Developers',
|
|
118 |
+ 'Topic :: Software Development :: Build Tools',
|
|
119 |
+
|
|
120 |
+ 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
|
121 |
+ 'License :: OSI Approved :: Apache Software License',
|
|
122 |
+
|
|
123 |
+ # Specify the Python versions you support here. In particular, ensure
|
|
124 |
+ # that you indicate whether you support Python 2, Python 3 or both.
|
|
125 |
+ 'Programming Language :: Python :: 2',
|
|
126 |
+ 'Programming Language :: Python :: 2.7',
|
|
127 |
+ 'Programming Language :: Python :: 3',
|
|
128 |
+ 'Programming Language :: Python :: 3.4',
|
|
129 |
+ 'Programming Language :: Python :: 3.5',
|
|
130 |
+ 'Programming Language :: Python :: 3.6',
|
|
131 |
+ ],
|
|
132 |
+
|
|
133 |
+ # This field adds keywords for your project which will appear on the
|
|
134 |
+ # project page. What does your project relate to?
|
|
135 |
+ #
|
|
136 |
+ # Note that this is a string of words separated by whitespace, not a list.
|
|
137 |
+ keywords='CTD CWL CommonWL Galaxy Workflows WorkflowConversion', # Optional
|
|
138 |
+
|
|
139 |
+ # You can just specify package directories manually here if your project is
|
|
140 |
+ # simple. Or you can use find_packages().
|
|
141 |
+ #
|
|
142 |
+ # Alternatively, if you just want to distribute a single Python file, use
|
|
143 |
+ # the `py_modules` argument instead as follows, which will expect a file
|
|
144 |
+ # called `my_module.py` to exist:
|
|
145 |
+ #
|
|
146 |
+ py_modules=["convert"],
|
|
147 |
+ #
|
|
148 |
+ packages=find_packages(exclude=['contrib', 'docs', 'tests']), # Required
|
|
149 |
+
|
|
150 |
+ # This field lists other packages that your project depends on to run.
|
|
151 |
+ # Any package you put here will be installed by pip when your project is
|
|
152 |
+ # installed, so they must be valid existing projects.
|
|
153 |
+ #
|
|
154 |
+ # For an analysis of "install_requires" vs pip's requirements files see:
|
|
155 |
+ # https://packaging.python.org/en/latest/requirements.html
|
|
156 |
+ install_requires=['lxml', 'ruamel.yaml'], # Optional
|
|
157 |
+ # install_requires=['lxml', 'ctdopts'], # Optional
|
|
158 |
+
|
|
159 |
+ # List additional groups of dependencies here (e.g. development
|
|
160 |
+ # dependencies). Users will be able to install these using the "extras"
|
|
161 |
+ # syntax, for example:
|
|
162 |
+ #
|
|
163 |
+ # $ pip install sampleproject[dev]
|
|
164 |
+ #
|
|
165 |
+ # Similar to `install_requires` above, these must be valid existing
|
|
166 |
+ # projects.
|
|
167 |
+ # extras_require={ # Optional
|
|
168 |
+ # 'dev': ['check-manifest'],
|
|
169 |
+ # 'test': ['coverage'],
|
|
170 |
+ # },
|
|
171 |
+
|
|
172 |
+ # If there are data files included in your packages that need to be
|
|
173 |
+ # installed, specify them here.
|
|
174 |
+ #
|
|
175 |
+ # If using Python 2.6 or earlier, then these have to be included in
|
|
176 |
+ # MANIFEST.in as well.
|
|
177 |
+ package_data={ # Optional
|
|
178 |
+ 'ctdconverter': ['galaxy/macros.xml'],
|
|
179 |
+ },
|
|
180 |
+
|
|
181 |
+ # To provide executable scripts, use entry points in preference to the
|
|
182 |
+ # "scripts" keyword. Entry points provide cross-platform support and allow
|
|
183 |
+ # `pip` to create the appropriate form of executable for the target
|
|
184 |
+ # platform.
|
|
185 |
+ #
|
|
186 |
+ # For example, the following would provide a command called `sample` which
|
|
187 |
+ # executes the function `main` from this package when invoked:
|
|
188 |
+ entry_points={ # Optional
|
|
189 |
+ 'console_scripts': [
|
|
190 |
+ 'CTDConverter=convert:main',
|
|
191 |
+ ],
|
|
192 |
+ },
|
|
193 |
+)
|