-
Notifications
You must be signed in to change notification settings - Fork 55
/
setup.py
64 lines (57 loc) · 2.14 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
59
60
61
62
63
64
### This is the much older setup script originally used by things like
### setuptools and distutils. It's fallen out of favor by more recent
### packaging tools, but is still referred to on occasion.
### It's a hold-over from the Python 2.7 days, so there are a fair number
### of sharp edges and stone clubs.
### For more info see https://python-packaging.readthedocs.io/en/latest/index.html
import io
import os
from setuptools import find_packages, setup
__version__ = "2.0.1"
def read_from(file):
reply = []
with io.open(os.path.join(here, file), encoding="utf8") as f:
for line in f:
line = line.strip()
if not line:
break
if line[:2] == "-r":
reply += read_from(line.split(" ")[1])
continue
if line[0] != "#" or line[:2] != "//":
reply.append(line)
return reply
here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, "README.rst"), encoding="utf8") as f:
README = f.read()
with io.open(os.path.join(here, "CHANGELOG.md"), encoding="utf8") as f:
CHANGES = f.read()
setup(
name="pywebpush",
version=__version__,
packages=find_packages(),
description="WebPush publication library",
long_description=README + "\n\n" + CHANGES,
classifiers=[
"Topic :: Internet :: WWW/HTTP",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
],
keywords="push webpush publication",
author="JR Conlin",
author_email="src+webpusher@jrconlin.com",
url="https://github.com/web-push-libs/pywebpush",
license="MPL2",
include_package_data=True,
zip_safe=False,
install_requires=read_from("requirements.txt"),
tests_require=read_from("test-requirements.txt"),
# This used to specify the entry point script that will
# be created, and still will if you run
# `python setup.py develop`
entry_points={
"console_scripts": ["pywebpush=pywebpush.__main__:main"],
},
)