-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 #77 from jazzband/modernize-setupcfg
modernize setup.cfg and pyproject.toml
- Loading branch information
Showing
7 changed files
with
82 additions
and
56 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ setuptools | |
wheel | ||
setuptools_scm | ||
tox>=3.5 | ||
build | ||
-e ./ |
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,6 +1,14 @@ | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
try: | ||
__version__ = get_distribution(__name__).version | ||
except DistributionNotFound: | ||
# package is not installed | ||
pass | ||
try: # py38 or later | ||
from importlib.metadata import version, PackageNotFoundError | ||
try: | ||
__version__ = version("package-name") | ||
except PackageNotFoundError: | ||
# package is not installed | ||
pass | ||
except ImportError: # py36, py37 | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
try: | ||
__version__ = get_distribution(__name__).version | ||
except DistributionNotFound: | ||
# package is not installed | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] | ||
|
||
[tool.setuptools_scm] | ||
# this empty section means: use_scm_version=True | ||
version_scheme = "guess-next-dev" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,50 @@ | ||
[metadata] | ||
name = django-redshift-backend | ||
url= https://github.com/jazzband/django-redshift-backend | ||
author = shimizukawa | ||
author_email = [email protected] | ||
license = Apache Software License | ||
license_file = LICENSE | ||
description = Redshift database backend for Django | ||
long_description = file: README.rst, CHANGES.rst | ||
long_description_content_type = text/x-rst | ||
keywords = django, redshift | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
License :: OSI Approved :: Apache Software License | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Framework :: Django | ||
Framework :: Django :: 2.2 | ||
Framework :: Django :: 3.0 | ||
Framework :: Django :: 3.1 | ||
Intended Audience :: Developers | ||
Environment :: Plugins | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
project_urls = | ||
Documentation = https://django-redshift-backend.readthedocs.io/ | ||
Release notes = https://django-redshift-backend.readthedocs.io/en/master/changes.html | ||
Source = https://github.com/jazzband/django-redshift-backend | ||
Tracker = https://github.com/jazzband/django-redshift-backend/issues | ||
|
||
[options] | ||
python_requires = >=3.6, <4 | ||
packages = find: | ||
include_package_data = false | ||
zip_safe = false | ||
install_requires = | ||
django | ||
setup_requires = | ||
setuptools_scm | ||
|
||
[options.extras_require] | ||
psycopg2-binary = psycopg2-binary | ||
psycopg2 = psycopg2 | ||
|
||
[wheel] | ||
universal = 1 | ||
|
||
|
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,50 +1,3 @@ | ||
from setuptools import setup, find_packages | ||
import os | ||
from setuptools import setup | ||
|
||
requires = [ | ||
'django', | ||
] | ||
|
||
|
||
def read(filename): | ||
fpath = os.path.join(os.path.dirname(os.path.abspath(__file__)), filename) | ||
with open(fpath) as f: | ||
return f.read() | ||
|
||
|
||
setup( | ||
name='django-redshift-backend', | ||
setup_requires=['setuptools_scm'], | ||
use_scm_version=True, | ||
packages=find_packages(), | ||
url='https://github.com/jazzband/django-redshift-backend', | ||
license='Apache Software License', | ||
author='shimizukawa', | ||
author_email='[email protected]', | ||
description='Redshift database backend for Django', | ||
long_description=read('README.rst') + read('CHANGES.rst'), | ||
long_description_content_type='text/x-rst', | ||
install_requires=requires, | ||
extra_requires={ | ||
'psycopg2-binary': ['psycopg2-binary'], | ||
'psycopg2': ['psycopg2'], | ||
}, | ||
python_requires='>=3.6, <4', | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Framework :: Django', | ||
'Framework :: Django :: 2.2', | ||
'Framework :: Django :: 3.0', | ||
'Framework :: Django :: 3.1', | ||
'Intended Audience :: Developers', | ||
'Environment :: Plugins', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], | ||
) | ||
setup() |