forked from NLeSC/python-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
76 lines (69 loc) · 2.77 KB
/
setup.py
File metadata and controls
76 lines (69 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
test_deps = [
'pytest',
'pytest-cov',
'pycodestyle',
]
# To update the package version number, edit CITATION.cff
with open('CITATION.cff', 'r') as cff:
for line in cff:
if 'version:' in line:
version = line.replace('version:', '').strip().strip('"')
with open('README.rst') as readme_file:
readme = readme_file.read()
{%- set license_classifiers = {
'MIT license': 'License :: OSI Approved :: MIT License',
'BSD license': 'License :: OSI Approved :: BSD License',
'ISC license': 'License :: OSI Approved :: ISC License (ISCL)',
'Apache Software License 2.0': 'License :: OSI Approved :: Apache Software License',
'GNU General Public License v3 or later': 'License :: OSI Approved :: GNU General Public License'
} %}
setup(
name='{{ cookiecutter.project_slug.lower().replace(' ', '_').replace('-', '_')}}',
version=version,
description="{{ cookiecutter.project_short_description.replace('\"', '\\\"') }}",
long_description=readme + '\n\n',
author="{{ cookiecutter.full_name.replace('\"', '\\\"') }}",
author_email='{{ cookiecutter.email }}',
url='https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug.lower().replace(' ', '_').replace('-', '_')}}',
packages=[
'{{ cookiecutter.project_slug.lower().replace(' ', '_').replace('-', '_')}}',
],
include_package_data=True,
{%- if cookiecutter.open_source_license in license_classifiers %}
license="{{ cookiecutter.open_source_license }}",
{%- endif %}
zip_safe=False,
keywords='{{ cookiecutter.project_slug }}',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
{%- if cookiecutter.open_source_license in license_classifiers %}
'{{ license_classifiers[cookiecutter.open_source_license] }}',
{%- endif %}
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
test_suite='tests',
install_requires=[], # FIXME: add your package's dependencies to this list
setup_requires=[
# dependency for `python setup.py test`
'pytest-runner',
# dependencies for `python setup.py build_sphinx`
'sphinx',
'sphinx_rtd_theme',
'recommonmark'
],
tests_require=test_deps,
extras_require={
'dev': ['prospector[with_pyroma]', 'yapf', 'isort'] + test_deps,
},
data_files=[('citation/{{ cookiecutter.project_slug.lower().replace(' ', '_').replace('-', '_')}}', ['CITATION.cff'])]
)