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
|
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as build_ext
from Cython.Build import cythonize
with open('README.md') as f:
long_description = f.read()
with open('httptools/_version.py') as f:
for line in f:
if line.startswith('__version__ ='):
_, _, version = line.partition('=')
VERSION = version.strip(" \n'\"")
break
else:
raise RuntimeError(
'unable to read the version from httptools/_version.py')
setup(
name='httptools',
version=VERSION,
description='A collection of framework independent HTTP protocol utils.',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/MagicStack/httptools',
classifiers=[
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Environment :: Web Environment',
'Development Status :: 5 - Production/Stable',
],
platforms=['macOS', 'POSIX', 'Windows'],
zip_safe=False,
author='Yury Selivanov',
author_email='yury@magic.io',
license='MIT',
packages=['httptools', 'httptools.parser'],
ext_modules=cythonize([
Extension(
"httptools.parser.parser",
["httptools/parser/parser.pyx"],
libraries=['http_parser']
)
]),
include_package_data=False,
test_suite='tests.suite'
)
|