-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrate to setup.cfg * extract package's version from __init__.py * factorize extra deps * Update changelog * Fix flake8 dep --------- Co-authored-by: Steven Loria <[email protected]>
- Loading branch information
Showing
3 changed files
with
59 additions
and
68 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,60 @@ | ||
[bdist_wheel] | ||
universal=1 | ||
[metadata] | ||
name = environs | ||
version = attr: environs.__version__ | ||
author = Steven Loria | ||
author_email = [email protected] | ||
license = MIT | ||
description = simplified environment variable parsing | ||
keywords = | ||
environment | ||
variables | ||
parsing | ||
config | ||
configuration | ||
12factor | ||
envvars | ||
url = https://github.com/sloria/environs | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
classifiers = | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Natural Language :: English | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: 3.11 | ||
Typing :: Typed | ||
project_urls = | ||
Issues = https://github.com/sloria/environs/issues | ||
Changelog = https://github.com/sloria/environs/blob/master/CHANGELOG.md | ||
|
||
[options] | ||
packages = environs | ||
zip_safe = False | ||
install_requires = marshmallow>=3.0.0; python-dotenv | ||
python_requires = >=3.7 | ||
|
||
[options.extras_require] | ||
django = | ||
dj-database-url | ||
dj-email-url | ||
django-cache-url | ||
tests = | ||
pytest | ||
environs[django] | ||
lint = | ||
flake8==6.1.0 | ||
flake8-bugbear==23.11.28 | ||
mypy==0.910 | ||
pre-commit~=3.6 | ||
dev = | ||
environs[tests,lint] | ||
tox | ||
|
||
[options.package_data] | ||
environs = py.typed | ||
|
||
[flake8] | ||
ignore = E203, E266, E501, W503, B907 | ||
|
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,68 +1,3 @@ | ||
import re | ||
|
||
from setuptools import setup | ||
|
||
INSTALL_REQUIRES = ["marshmallow>=3.0.0", "python-dotenv"] | ||
DJANGO_REQUIRES = ["dj-database-url", "dj-email-url", "django-cache-url"] | ||
EXTRAS_REQUIRE = { | ||
"django": DJANGO_REQUIRES, | ||
"tests": ["pytest"] + DJANGO_REQUIRES, | ||
"lint": ["flake8==6.1.0", "flake8-bugbear==23.11.28", "mypy==0.910", "pre-commit~=3.6"], | ||
} | ||
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"] | ||
PYTHON_REQUIRES = ">=3.8" | ||
|
||
|
||
def find_version(fname): | ||
version = "" | ||
with open(fname) as fp: | ||
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') | ||
for line in fp: | ||
m = reg.match(line) | ||
if m: | ||
version = m.group(1) | ||
break | ||
if not version: | ||
raise RuntimeError("Cannot find version information") | ||
return version | ||
|
||
|
||
def read(fname): | ||
with open(fname) as fp: | ||
content = fp.read() | ||
return content | ||
|
||
|
||
setup( | ||
name="environs", | ||
packages=["environs"], | ||
package_data={"environs": ["py.typed"]}, | ||
version=find_version("environs/__init__.py"), | ||
description="simplified environment variable parsing", | ||
long_description=read("README.md"), | ||
long_description_content_type="text/markdown", | ||
author="Steven Loria", | ||
author_email="[email protected]", | ||
url="https://github.com/sloria/environs", | ||
install_requires=INSTALL_REQUIRES, | ||
extras_require=EXTRAS_REQUIRE, | ||
license="MIT", | ||
zip_safe=False, | ||
python_requires=PYTHON_REQUIRES, | ||
keywords="environment variables parsing config configuration 12factor envvars", | ||
classifiers=[ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Typing :: Typed", | ||
], | ||
project_urls={ | ||
"Issues": "https://github.com/sloria/environs/issues", | ||
"Changelog": "https://github.com/sloria/environs/blob/master/CHANGELOG.md", | ||
}, | ||
) | ||
setup() |