diff --git a/setup.json b/setup.json deleted file mode 100644 index 9869277..0000000 --- a/setup.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "author": "Juan S. Medina, Juan E. Arango", - "classifiers": [ - "License :: OSI Approved :: MIT License", - "Operating System :: Unix", - "Operating System :: POSIX", - "Topic :: Utilities" - ], - "install_requires": ["cookiecutter>=1.7.3"], - "setup_requires": ["pytest-runner>=5.3.1"], - "extras_require": { - "test": [ - "pytest-cov>=2.12.1", - "binaryornot>=0.4.4", - "pytest>=6.2.5", - "pytest-cookies>=0.6.1", - "tox>=3.24.3" - ] - }, - "keywords": ["cookiecutter", "toil"], - "license": "BSD", - "name": "cookiecutter-toil", - "description": "🍪 A cookiecutter for the creation of toil pipelines.", - "long_description": "📘 learn more about this project on [GitHub](https://github.com/papaemmelab/cookiecutter-toil)!", - "long_description_content_type": "text/markdown", - "url": "https://github.com/papaemmelab/cookiecutter-toil" -} diff --git a/setup.py b/setup.py index 0c3d0ad..99247e0 100644 --- a/setup.py +++ b/setup.py @@ -1,32 +1,43 @@ """cookiecutter-toil setup.py.""" - -from os.path import join -from os.path import abspath -from os.path import dirname -import json - from setuptools import find_packages from setuptools import setup -# make sure we use absolute paths -ROOT = abspath(dirname(__file__)) - -# please put setup keywords in the setup.json to keep this file clean -with open(join(ROOT, "setup.json"), "r") as f: - SETUP = json.load(f) - setup( # the version is only defined in one place - version="1.0.0", - + version="2.0.0", # in combination with recursive-includes in MANIFEST.in, non-python files # included inside the {{cookiecutter.project_slug}} will be copied to the # site-packages installation directory include_package_data=True, - # return a list all Python packages found within the ROOT directory packages=find_packages(), - - # pass parameters loaded from setup.json including author and version - **SETUP - ) + # package-specific parameters + author="Juan S. Medina, Juan E. Arango", + classifiers=[ + "License :: OSI Approved :: MIT License", + "Operating System :: Unix", + "Operating System :: POSIX", + "Topic :: Utilities", + ], + install_requires=["cookiecutter>=1.7.3"], + setup_requires=["pytest-runner>=5.3.1"], + extras_require={ + "test": [ + "pytest-cov>=2.12.1", + "binaryornot>=0.4.4", + "pytest>=6.2.5", + "pytest-cookies>=0.6.1", + "tox>=3.24.3", + ] + }, + keywords=["cookiecutter", "toil"], + license="BSD", + name="cookiecutter-toil", + description="🍪 A cookiecutter for the creation of toil pipelines.", + long_description=( + "📘 learn more about this project on " + "[GitHub](https://github.com/papaemmelab/cookiecutter-toil)!" + ), + long_description_content_type="text/markdown", + url="https://github.com/papaemmelab/cookiecutter-toil", +) diff --git a/{{cookiecutter.project_slug}}/setup.json b/{{cookiecutter.project_slug}}/setup.json deleted file mode 100644 index 4320d13..0000000 --- a/{{cookiecutter.project_slug}}/setup.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "classifiers": [ - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Operating System :: Unix", - "Operating System :: POSIX", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Utilities" - ], - "entry_points": { - "console_scripts": [ - "{{cookiecutter.project_slug}}={{cookiecutter.project_slug}}.cli:main" - ] - }, - "setup_requires": [ - "pytest-runner>=5.3.1" - ], - "install_requires": [ - {% if cookiecutter.cli_type == 'toil' %}"toil_container>=2.0.0"{% else %}"click>=7.0"{% endif %} - ], - "extras_require": { - "test": [ - "coverage>=5.5.0", - "pydocstyle>=6.1.1", - "pytest-cov>=2.12.1", - "pytest>=6.2.5", - "pytest-env>=0.6.2", - "pytest-sugar>=0.9.1", - "pylint>=1.8.1", - "requests>=2.18.4", - "tox>=2.9.1" - ] - }, - "author": "{{cookiecutter.full_name}}", - "keywords": [], - "license": "BSD", - "name": "{{cookiecutter.project_slug}}", - "test_suite": "tests", - "long_description": "📘 learn more on `GitHub `_!", - "description": "{{cookiecutter.project_description}}", - "url": "https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_slug}}" -} diff --git a/{{cookiecutter.project_slug}}/setup.py b/{{cookiecutter.project_slug}}/setup.py index e2175fd..5d86117 100644 --- a/{{cookiecutter.project_slug}}/setup.py +++ b/{{cookiecutter.project_slug}}/setup.py @@ -3,17 +3,12 @@ from os.path import join from os.path import abspath from os.path import dirname -import json from setuptools import find_packages from setuptools import setup ROOT = abspath(dirname(__file__)) -# please put setup keywords in the setup.json to keep this file clean -with open(join(ROOT, "setup.json"), "r") as f: - SETUP = json.load(f) - # see 4 > https://packaging.python.org/guides/single-sourcing-package-version/ with open(join(ROOT, "{{cookiecutter.project_slug}}", "VERSION"), "r") as f: VERSION = f.read().strip() @@ -21,15 +16,53 @@ setup( # single source package version version=VERSION, - # in combination with recursive-includes in MANIFEST.in, non-python files # within the {{cookiecutter.project_slug}} will be copied into the # site-packages and wheels installation directories include_package_data=True, - # return a list all Python packages found within the ROOT directory packages=find_packages(), - - # pass parameters loaded from setup.json including author and version - **SETUP - ) + # package-specific parameters + classifiers=[ + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: Unix", + "Operating System :: POSIX", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Utilities", + ], + entry_points={ + "console_scripts": [ + "{{cookiecutter.project_slug}}={{cookiecutter.project_slug}}.cli:main" + ] + }, + setup_requires=["pytest-runner>=5.3.1"], + install_requires=[{% if cookiecutter.cli_type == 'toil' %}"toil_container>=2.0.0"{% else %}"click>=7.0"{% endif %}], + extras_require={ + "test": [ + "coverage>=5.5.0", + "pydocstyle>=6.1.1", + "pytest-cov>=2.12.1", + "pytest>=6.2.5", + "pytest-env>=0.6.2", + "pytest-sugar>=0.9.1", + "pylint>=1.8.1", + "requests>=2.18.4", + "tox>=2.9.1", + ] + }, + author="{{cookiecutter.full_name}}", + keywords=[], + license="BSD", + name="{{cookiecutter.project_slug}}", + test_suite="tests", + description="{{cookiecutter.project_description}}", + long_description=( + "📘 learn more of this project on [GitHub]" + "(https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_slug}})!" + ), + long_description_content_type="text/markdown", + url="https://github.com/{{cookiecutter.github_account}}/{{cookiecutter.project_slug}}", +)