forked from CasperWA/push-protected
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (40 loc) · 1.54 KB
/
setup.py
File metadata and controls
48 lines (40 loc) · 1.54 KB
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
from pathlib import Path
import re
from setuptools import setup, find_packages
TOP_DIR = Path(__file__).parent.resolve()
with open(TOP_DIR.joinpath("push_action/__init__.py"), "r") as handle:
for line in handle.readlines():
version = re.findall(r'__version__ = "(.*)"', line)
if version:
break
else:
raise RuntimeError("Could not determine version from push_action/__init__.py")
with open(TOP_DIR.joinpath("README.md")) as handle:
README = handle.read()
with open(TOP_DIR.joinpath("requirements.txt")) as handle:
REQUIREMENTS = handle.read()
with open(TOP_DIR.joinpath("requirements_dev.txt")) as handle:
REQUIREMENTS_DEV = handle.read()
setup(
name="push-action",
version=version[0],
url="https://github.com/CasperWA/push-protected",
license="MIT",
author="Casper Welzel Andersen",
author_email="casper+github@welzel.nu",
description="Push local workflow commit(s) to protected branches with required status checks.",
long_description=README,
long_description_content_type="text/markdown",
packages=find_packages(),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Intended Audience :: Developers",
],
python_requires=">=3.8",
install_requires=REQUIREMENTS,
extras_require={"dev": REQUIREMENTS_DEV},
entry_points={"console_scripts": ["push-action=push_action.run:main"]},
)