mirror of
https://github.com/torproject/lego.git
synced 2024-11-27 19:50:37 +00:00
4903d4baa8
Adding the packages the new donate stuff is using to the repository so that they do not need to be downloaded to run lektor. I had to make some modifications to the setup.py files for these modules in order to get them to work. Otherwise I was getting errors about invalid syntax in the requires.txt files and also one of the modules was requiring lektor which was pulling in a bunch of stuff that's not needed because we are running inside lektor. I put all these changes in patch files in a new patches subdirectory.
67 lines
2.1 KiB
Python
67 lines
2.1 KiB
Python
import re
|
|
from setuptools import setup
|
|
|
|
INSTALL_REQUIRES = ["marshmallow>=2.7.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==3.8.2", "flake8-bugbear==20.1.4", "mypy==0.770", "pre-commit~=2.4"],
|
|
}
|
|
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]
|
|
PYTHON_REQUIRES = ">=3.5.3"
|
|
|
|
|
|
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="sloria1@gmail.com",
|
|
url="https://github.com/sloria/environs",
|
|
install_requires=INSTALL_REQUIRES,
|
|
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.5",
|
|
"Programming Language :: Python :: 3.6",
|
|
"Programming Language :: Python :: 3.7",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Typing :: Typed",
|
|
],
|
|
project_urls={
|
|
"Issues": "https://github.com/sloria/environs/issues",
|
|
"Changelog": "https://github.com/sloria/environs/blob/master/CHANGELOG.md",
|
|
},
|
|
)
|