-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
74 lines (62 loc) · 2.38 KB
/
setup.py
File metadata and controls
74 lines (62 loc) · 2.38 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import setuptools
from setuptools.command.build_py import build_py
import keepasshttp
here = os.path.abspath(os.path.dirname(__file__))
def get_content(filename):
with open(os.path.join(here, filename), encoding="utf-8") as f:
return f.read()
class PypiPublish(build_py):
# noinspection PyTypeChecker
def run(self):
import sys
import subprocess
def python(cmd):
if isinstance(cmd, str):
cmd = cmd.split()
cmd.insert(0, sys.executable)
subprocess.check_call(cmd)
python("-m pip install setuptools wheel twine")
python("setup.py sdist bdist_wheel --universal")
python("-m twine upload --verbose dist/*")
setuptools.setup(
name="keepasshttp",
version=keepasshttp.__VERSION__,
packages=["keepasshttp"],
url="https://github.com/cyrbil/python_keepass_http",
license="License :: OSI Approved :: MIT License",
author="Cyril DEMINGEON",
author_email="1126098+cyrbil@users.noreply.github.com",
description="Python client for KeePassHTTP to interact with KeePass's credentials",
long_description=get_content("README.md"),
long_description_content_type="text/markdown",
install_requires=[
requirement.split(maxsplit=1)[0]
for requirement in get_content("requirements.txt").split('\n')
if requirement
],
setup_requires=["pytest-runner", "pre-commit"],
tests_require=["pytest-cov"],
include_package_data=True,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9-dev",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Security",
],
cmdclass={"publish": PypiPublish},
)