2016-04-25 23:54:57 +02:00
|
|
|
import io
|
|
|
|
import os
|
|
|
|
|
2016-04-27 22:07:52 +02:00
|
|
|
from setuptools import find_packages, setup
|
2016-04-25 23:54:57 +02:00
|
|
|
|
2019-01-04 22:52:44 +01:00
|
|
|
|
2021-07-28 16:45:09 +02:00
|
|
|
__version__ = "1.14.0"
|
2016-04-26 02:09:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
def read_from(file):
|
|
|
|
reply = []
|
|
|
|
with io.open(os.path.join(here, file), encoding='utf8') as f:
|
2019-01-04 22:52:44 +01:00
|
|
|
for line in f:
|
|
|
|
line = line.strip()
|
|
|
|
if not line:
|
2016-04-26 02:09:58 +02:00
|
|
|
break
|
2019-01-04 22:52:44 +01:00
|
|
|
if line[:2] == '-r':
|
|
|
|
reply += read_from(line.split(' ')[1])
|
2017-03-08 02:05:57 +01:00
|
|
|
continue
|
2019-01-04 22:52:44 +01:00
|
|
|
if line[0] != '#' or line[:2] != '//':
|
2019-01-07 17:35:54 +01:00
|
|
|
reply.append(line)
|
2016-04-26 02:09:58 +02:00
|
|
|
return reply
|
|
|
|
|
|
|
|
|
2016-04-25 23:54:57 +02:00
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
2017-02-07 00:45:18 +01:00
|
|
|
with io.open(os.path.join(here, 'README.rst'), encoding='utf8') as f:
|
2016-04-25 23:54:57 +02:00
|
|
|
README = f.read()
|
|
|
|
with io.open(os.path.join(here, 'CHANGELOG.md'), encoding='utf8') as f:
|
|
|
|
CHANGES = f.read()
|
|
|
|
|
2017-02-10 14:35:35 +01:00
|
|
|
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",
|
|
|
|
],
|
|
|
|
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'),
|
2017-03-08 02:05:57 +01:00
|
|
|
tests_require=read_from('test-requirements.txt'),
|
|
|
|
entry_points="""
|
|
|
|
[console_scripts]
|
|
|
|
pywebpush = pywebpush.__main__:main
|
|
|
|
""",
|
2017-02-10 14:35:35 +01:00
|
|
|
)
|