-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.py
58 lines (46 loc) · 1.26 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import os
from setuptools import setup
def rel(*xs):
return os.path.join(os.path.abspath(os.path.dirname(__file__)), *xs)
with open(rel("README.md")) as f:
long_description = f.read()
with open(rel("cursive_re", "__init__.py"), "r") as f:
version_marker = "__version__ = "
for line in f:
if line.startswith(version_marker):
_, version = line.split(version_marker)
version = version.strip().strip('"')
break
else:
raise RuntimeError("Version marker not found.")
dependencies = []
extra_dependencies = {}
extra_dependencies["dev"] = [
# Linting
"flake8",
"flake8-bugbear",
"flake8-quotes",
"isort",
# Misc
"bumpversion",
"mypy",
"twine",
# Testing
"pytest",
"pytest-cov",
]
setup(
name="cursive_re",
version=version,
author="Bogdan Popa",
author_email="bogdan@defn.io",
url="https://github.com/Bogdanp/cursive_re",
description="Readable regular expressions for Python 3.6 and up.",
long_description=long_description,
long_description_content_type="text/markdown",
packages=["cursive_re"],
include_package_data=True,
install_requires=dependencies,
python_requires=">=3.6",
extras_require=extra_dependencies,
)