Skip to content

Commit

Permalink
Merge pull request #410 from jdufresne/setup-cfg
Browse files Browse the repository at this point in the history
Use setuptools declarative syntax via setup.cfg
  • Loading branch information
boxed authored Aug 25, 2021
2 parents 1bf824d + 14e5c78 commit ad82647
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 39 deletions.
25 changes: 25 additions & 0 deletions setup.cfg
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
40 changes: 1 addition & 39 deletions setup.py
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()

0 comments on commit ad82647

Please sign in to comment.