|
1 | | -"""A setuptools based setup module. |
| 1 | +"""Compatibility setup.py that keeps custom BLAST bundling hooks.""" |
2 | 2 |
|
3 | | -See: |
4 | | -https://packaging.python.org/en/latest/distributing.html |
5 | | -https://github.com/pypa/sampleproject |
6 | | -""" |
7 | | -# Always prefer setuptools over distutils |
8 | 3 | from setuptools import setup, find_packages |
9 | 4 | from distutils.command.build import build |
10 | | -# To use a consistent encoding |
11 | | -from codecs import open |
12 | 5 | from os import path, remove, mkdir |
13 | 6 | import platform |
14 | 7 | import shutil |
@@ -68,185 +61,18 @@ def bundle_blast(project_root, version): |
68 | 61 | class bdist_wheel(_bdist_wheel): |
69 | 62 | def finalize_options(self): |
70 | 63 | _bdist_wheel.finalize_options(self) |
71 | | - # Mark us as not a pure python package |
72 | 64 | self.root_is_pure = False |
73 | 65 |
|
74 | 66 | class CustomBuildCommand(build): |
75 | 67 | def run(self): |
76 | 68 | bundle_blast(here, BLAST_VERSION) |
77 | 69 | super(CustomBuildCommand, self).run() |
78 | 70 |
|
79 | | -# Get the long description from the README file |
80 | | -with open(path.join(here, 'README.md'), encoding='utf-8') as f: |
81 | | - long_description = f.read() |
82 | | - |
83 | | -version = {} |
84 | | -with open(path.join(here, 'gff3tool', 'bin', 'version.py')) as fp: |
85 | | - exec (fp.read(), version) |
86 | | - |
87 | | -# Arguments marked as "Required" below must be included for upload to PyPI. |
88 | | -# Fields marked as "Optional" may be commented out. |
89 | 71 | setup( |
90 | | - # This is the name of your project. The first time you publish this |
91 | | - # package, this name will be registered for you. It will determine how |
92 | | - # users can install this project, e.g.: |
93 | | - # |
94 | | - # $ pip install bcinfo |
95 | | - # |
96 | | - # And where it will live on PyPI: https://pypi.org/project/bcinfo/ |
97 | | - # |
98 | | - # There are some restrictions on what makes a valid project name |
99 | | - # specification here: |
100 | | - # https://packaging.python.org/specifications/core-metadata/#name |
101 | | - name='gff3tool', # Required |
102 | | - |
103 | | - # Versions should comply with PEP 440: |
104 | | - # https://www.python.org/dev/peps/pep-0440/ |
105 | | - # |
106 | | - # For a discussion on single-sourcing the version across setup.py and the |
107 | | - # project code, see |
108 | | - # https://packaging.python.org/en/latest/single_source_version.html |
109 | | - version=version['__version__'], # Required |
110 | | - |
111 | | - # This is a one-line description or tagline of what your project does. This |
112 | | - # corresponds to the "Summary" metadata field: |
113 | | - # https://packaging.python.org/specifications/core-metadata/#summary |
114 | | - description='Python programs for processing GFF3 files', # Required |
115 | | - |
116 | | - # This is an optional longer description of your project that represents |
117 | | - # the body of text which users will see when they visit PyPI. |
118 | | - # |
119 | | - # Often, this is the same as your README, so you can just read it in from |
120 | | - # that file directly (as we have already done above) |
121 | | - # |
122 | | - # This field corresponds to the "Description" metadata field: |
123 | | - # https://packaging.python.org/specifications/core-metadata/#description-optional |
124 | | - long_description=long_description, # Optional |
125 | | - long_description_content_type='text/markdown', |
126 | | - # This should be a valid link to your project's main homepage. |
127 | | - # |
128 | | - # This field corresponds to the "Home-Page" metadata field: |
129 | | - # https://packaging.python.org/specifications/core-metadata/#home-page-optional |
130 | | - url='https://github.com/NAL-i5K/GFF3toolkit', # Optional |
131 | | - |
132 | | - # This should be your name or the name of the organization which owns the |
133 | | - # project. |
134 | | - author='NAL i5k workspace', # Optional |
135 | | - |
136 | | - # This should be a valid email address corresponding to the author listed |
137 | | - # above. |
138 | | - author_email='i5k@ars.usda.gov', # Optional |
139 | | - |
140 | | - # Classifiers help users find your project by categorizing it. |
141 | | - # |
142 | | - # For a list of valid classifiers, see |
143 | | - # https://pypi.python.org/pypi?%3Aaction=list_classifiers |
144 | | - classifiers=[ # Optional |
145 | | - # How mature is this project? Common values are |
146 | | - # 3 - Alpha |
147 | | - # 4 - Beta |
148 | | - # 5 - Production/Stable |
149 | | - 'Development Status :: 5 - Production/Stable', |
150 | | - 'Operating System :: POSIX :: Linux', |
151 | | - 'Operating System :: Microsoft :: Windows', |
152 | | - 'Operating System :: MacOS :: MacOS X', |
153 | | - # Indicate who your project is intended for |
154 | | - 'Intended Audience :: Science/Research', |
155 | | - 'Topic :: Scientific/Engineering :: Bio-Informatics', |
156 | | - # Pick your license as you wish |
157 | | - 'License :: Public Domain', |
158 | | - # Specify the Python versions you support here. In particular, ensure |
159 | | - # that you indicate whether you support Python 2, Python 3 or both. |
160 | | - 'Programming Language :: Python :: 3', |
161 | | - ], |
162 | | - |
163 | | - # This field adds keywords for your project which will appear on the |
164 | | - # project page. What does your project relate to? |
165 | | - # |
166 | | - # Note that this is a string of words separated by whitespace, not a list. |
167 | | - keywords='gff3 gff bioinformatics ', # Optional |
168 | | - |
169 | | - # Explicitly declare supported runtime versions for installers and tools. |
170 | | - python_requires='>=3.9', |
171 | | - |
172 | | - # You can just specify package directories manually here if your project is |
173 | | - # simple. Or you can use find_packages(). |
174 | | - # |
175 | | - # Alternatively, if you just want to distribute a single Python file, use |
176 | | - # the `py_modules` argument instead as follows, which will expect a file |
177 | | - # called `my_module.py` to exist: |
178 | | - # |
179 | | - # py_modules=["my_module"], |
180 | | - # |
181 | | - packages=find_packages(exclude=['contrib', 'docs', 'tests']), # Required |
182 | | - |
183 | 72 | cmdclass={ |
184 | 73 | 'build': CustomBuildCommand, |
185 | 74 | 'bdist_wheel': bdist_wheel |
186 | 75 | }, |
187 | | - |
188 | | - # This field lists other packages that your project depends on to run. |
189 | | - # Any package you put here will be installed by pip when your project is |
190 | | - # installed, so they must be valid existing projects. |
191 | | - # |
192 | | - # For an analysis of "install_requires" vs pip's requirements files see: |
193 | | - # https://packaging.python.org/en/latest/requirements.html |
194 | | - install_requires=[], # Optional |
195 | | - |
196 | | - # List additional groups of dependencies here (e.g. development |
197 | | - # dependencies). Users will be able to install these using the "extras" |
198 | | - # syntax, for example: |
199 | | - # |
200 | | - # $ pip install sampleproject[dev] |
201 | | - # |
202 | | - # Similar to `install_requires` above, these must be valid existing |
203 | | - # projects. |
204 | | - extras_require={ # Optional |
205 | | - }, |
206 | | - |
207 | | - # If there are data files included in your packages that need to be |
208 | | - # installed, specify them here. |
209 | | - # |
210 | | - # If using Python 2.6 or earlier, then these have to be included in |
211 | | - # MANIFEST.in as well. |
212 | | - package_data={ # Optional |
213 | | - }, |
214 | | - |
215 | | - # Although 'package_data' is the preferred approach, in some case you may |
216 | | - # need to place data files outside of your packages. See: |
217 | | - # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files |
218 | | - # |
219 | | - # In this case, 'data_file' will be installed into '<sys.prefix>/my_data' |
220 | | - data_files=[], # Optional |
221 | | - |
222 | | - # To provide executable scripts, use entry points in preference to the |
223 | | - # "scripts" keyword. Entry points provide cross-platform support and allow |
224 | | - # `pip` to create the appropriate form of executable for the target |
225 | | - # platform. |
226 | | - # |
227 | | - # For example, the following would provide a command called `sample` which |
228 | | - # executes the function `main` from this package when invoked: |
229 | | - entry_points={ # Optional |
230 | | - 'console_scripts': [ |
231 | | - 'gff3_fix=gff3tool.bin.gff3_fix:script_main', |
232 | | - 'gff3_merge=gff3tool.bin.gff3_merge:script_main', |
233 | | - 'gff3_QC=gff3tool.bin.gff3_QC:script_main', |
234 | | - 'gff3_sort=gff3tool.bin.gff3_sort:script_main', |
235 | | - 'gff3_to_fasta=gff3tool.bin.gff3_to_fasta:script_main' |
236 | | - ] |
237 | | - }, |
238 | | - include_package_data=True, # include other files |
239 | | - # List additional URLs that are relevant to your project as a dict. |
240 | | - # |
241 | | - # This field corresponds to the "Project-URL" metadata fields: |
242 | | - # https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use |
243 | | - # |
244 | | - # Examples listed include a pattern for specifying where the package tracks |
245 | | - # issues, where the source is hosted, where to say thanks to the package |
246 | | - # maintainers, and where to support the project financially. The key is |
247 | | - # what's used to render the link text on PyPI. |
248 | | - project_urls={ # Optional |
249 | | - 'Bug Reports': 'https://github.com/NAL-i5K/GFF3toolkit/issues', |
250 | | - 'Source': 'https://github.com/NAL-i5K/GFF3toolkit', |
251 | | - }, |
| 76 | + packages=find_packages(exclude=['contrib', 'docs', 'tests', 'tests.*']), |
| 77 | + include_package_data=True, |
252 | 78 | ) |
0 commit comments