Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1577 from cookiecutter/fix/setuptools-scm
Adopt setuptools-scm packaging
- Loading branch information
Showing
5 changed files
with
126 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 42.0.0", # required by pyproject+setuptools_scm integration | ||
"setuptools_scm[toml] >= 3.5.0", # required for "no-local-version" scheme | ||
"setuptools_scm_git_archive >= 1.0", | ||
"wheel", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
skip-string-normalization = true | ||
exclude = '/(tests/hooks-abort-render/hooks|docs\/HelloCookieCutter1)/' | ||
line-length = 88 | ||
target-version = ['py36'] | ||
|
||
[tool.setuptools_scm] | ||
local_scheme = "no-local-version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,13 @@ | ||
#!/usr/bin/env python | ||
"""cookiecutter distutils configuration.""" | ||
from setuptools import setup | ||
|
||
version = "2.0.0" | ||
|
||
with open('README.md', encoding='utf-8') as readme_file: | ||
readme = readme_file.read() | ||
|
||
requirements = [ | ||
'binaryornot>=0.4.4', | ||
'Jinja2>=2.7,<4.0.0', | ||
'click>=7.0,<8.0.0', | ||
'pyyaml>=5.3.1', | ||
'jinja2-time>=0.2.0', | ||
'python-slugify>=4.0.0', | ||
'requests>=2.23.0', | ||
] | ||
|
||
setup( | ||
name='cookiecutter', | ||
version=version, | ||
description=( | ||
'A command-line utility that creates projects from project ' | ||
'templates, e.g. creating a Python package project from a ' | ||
'Python package project template.' | ||
), | ||
long_description=readme, | ||
long_description_content_type='text/markdown', | ||
author='Audrey Feldroy', | ||
author_email='audreyr@gmail.com', | ||
url='https://github.com/cookiecutter/cookiecutter', | ||
packages=['cookiecutter'], | ||
package_dir={'cookiecutter': 'cookiecutter'}, | ||
entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']}, | ||
include_package_data=True, | ||
python_requires='>=3.6', | ||
install_requires=requirements, | ||
license='BSD', | ||
zip_safe=False, | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Programming Language :: Python", | ||
"Topic :: Software Development", | ||
], | ||
keywords=[ | ||
"cookiecutter", | ||
"Python", | ||
"projects", | ||
"project templates", | ||
"Jinja2", | ||
"skeleton", | ||
"scaffolding", | ||
"project directory", | ||
"package", | ||
"packaging", | ||
], | ||
#! /usr/bin/env python3 | ||
"""cookiecutter distutils configuration. | ||
The presence of this file ensures the support | ||
of pip editable mode *with setuptools only*. | ||
""" | ||
import setuptools | ||
|
||
# https://github.com/jazzband/pip-tools/issues/1278 | ||
setuptools.setup( | ||
use_scm_version={"local_scheme": "no-local-version"}, | ||
setup_requires=["setuptools_scm[toml]>=3.5.0"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters