-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use setuptools declarative syntax via setup.cfg
https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html This avoids mixing code and configuration, reduces boilerplate, and avoids custom logic at installation time.
- Loading branch information
Showing
2 changed files
with
26 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[matadata] | ||
name = freezegun | ||
version = attr: freezegun.__version__ | ||
description = Let your Python tests travel through time | ||
long_description = file: README.rst | ||
author = Steve Pulec | ||
author_email = [email protected] | ||
url = https://github.com/spulec/freezegun | ||
license = Apache 2.0 | ||
classifiers = | ||
License :: OSI Approved :: Apache Software License | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Programming Language :: Python :: Implementation :: PyPy | ||
|
||
[options] | ||
packages = freezegun | ||
python_requires = >=3.5 | ||
install_requires = | ||
python-dateutil >= 2.7 | ||
include_package_data = true |
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,42 +1,4 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import re | ||
|
||
from setuptools import setup | ||
|
||
with open('README.rst') as f: | ||
readme = f.read() | ||
|
||
|
||
def read_version(): | ||
with open(os.path.join('freezegun', '__init__.py')) as f: | ||
m = re.search(r'''__version__\s*=\s*['"]([^'"]*)['"]''', f.read()) | ||
if m: | ||
return m.group(1) | ||
raise ValueError("couldn't find version") | ||
|
||
|
||
setup( | ||
name='freezegun', | ||
version=read_version(), | ||
description='Let your Python tests travel through time', | ||
long_description=readme, | ||
author='Steve Pulec', | ||
author_email='[email protected]', | ||
url='https://github.com/spulec/freezegun', | ||
packages=['freezegun'], | ||
install_requires=['python-dateutil>=2.7'], | ||
include_package_data=True, | ||
license='Apache 2.0', | ||
python_requires='>=3.5', | ||
classifiers=[ | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
], | ||
) | ||
setup() |