-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
411 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,9 @@ pip-log.txt | |
env/ | ||
.vscode/ | ||
|
||
# lock file | ||
*.lock | ||
|
||
pyvenv.cfg | ||
share/* | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,54 @@ | ||
[build-system] | ||
requires = ["setuptools", "cython>=0.28.4,<4"] | ||
requires = ["setuptools", "cython>=0.28.4,<4", "toml"] | ||
|
||
[project] | ||
name = "thriftpy2" | ||
version = "0.5.2" | ||
description = "Pure python implementation of Apache Thrift." | ||
authors = [ | ||
{name = "ThriftPy Organization", email = "[email protected]"}, | ||
] | ||
dependencies = [ | ||
"ply>=3.4,<4.0", | ||
"six~=1.15", | ||
] | ||
requires-python = ">=3.6" | ||
readme = "README.rst" | ||
license = {file = "LICENSE"} | ||
keywords = ["thrift python thriftpy thriftpy2"] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Software Development", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://thriftpy2.readthedocs.io/" | ||
Source = "https://github.com/Thriftpy/thriftpy2" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"flake8>=2.5", | ||
"sphinx-rtd-theme>=0.1.9", | ||
"sphinx>=1.3", | ||
"pytest-reraise", | ||
"pytest>=6.1.1,<8.2.0", | ||
"tornado>=4.0,<7.0; python_version>='3.12'", | ||
"tornado>=4.0,<6.0; python_version<'3.12'", | ||
] | ||
|
||
tornado = [ | ||
"tornado>=4.0,<7.0; python_version>='3.12'", | ||
"tornado>=4.0,<6.0; python_version<'3.12'", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[metadata] | ||
license_files = LICENSE | ||
|
||
[wheel] | ||
universal = 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,28 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import re | ||
import sys | ||
import platform | ||
import toml | ||
|
||
from os.path import join, dirname | ||
from setuptools import setup, find_packages, Extension | ||
|
||
from setuptools import setup, find_packages | ||
from setuptools.extension import Extension | ||
|
||
with open(join(dirname(__file__), 'thriftpy2', '__init__.py'), 'r') as f: | ||
version = re.match(r".*__version__ = '(.*?)'", f.read(), re.S).group(1) | ||
|
||
install_requires = [ | ||
"ply>=3.4,<4.0", | ||
"six~=1.15", | ||
] | ||
|
||
tornado_requires = [ | ||
"tornado>=4.0,<7.0; python_version>='3.12'", | ||
"tornado>=4.0,<6.0; python_version<'3.12'", | ||
] | ||
meta = toml.load(join(dirname(__file__), 'pyproject.toml') ) | ||
install_requires = meta["project"]["dependencies"] | ||
dev_requires = meta["project"]["optional-dependencies"]["dev"] | ||
tornado_requires = meta["project"]["optional-dependencies"]["tornado"] | ||
|
||
try: | ||
from tornado import version as tornado_version | ||
if tornado_version < '5.0': | ||
tornado_requires.append("toro>=0.6") | ||
dev_requires.append("toro>=0.6") | ||
except ImportError: | ||
# tornado will now only get installed and we'll get the newer one | ||
pass | ||
|
||
dev_requires = [ | ||
"flake8>=2.5", | ||
"pytest>=2.8", | ||
"sphinx-rtd-theme>=0.1.9", | ||
"sphinx>=1.3", | ||
"pytest>=6.1.1", | ||
"multiprocess" | ||
] + tornado_requires | ||
|
||
|
||
cmdclass = {} | ||
ext_modules = [] | ||
|
||
# pypy detection | ||
|
@@ -71,48 +52,19 @@ | |
libraries=libraries)) | ||
ext_modules.append(Extension("thriftpy2.transport.sasl.cysasl", | ||
["thriftpy2/transport/sasl/cysasl.c"])) | ||
ext_modules.append(Extension("thriftpy2.protocol.cybin", | ||
ext_modules.append(Extension("thriftpy2.protocol.cybin.cybin", | ||
["thriftpy2/protocol/cybin/cybin.c"], | ||
libraries=libraries)) | ||
|
||
setup(name="thriftpy2", | ||
version=version, | ||
description="Pure python implementation of Apache Thrift.", | ||
keywords="thrift python thriftpy thriftpy2", | ||
author="ThriftPy Organization", | ||
author_email="[email protected]", | ||
setup( | ||
packages=find_packages(exclude=['benchmark', 'docs', 'tests']), | ||
entry_points={}, | ||
url="https://thriftpy2.readthedocs.io/", | ||
project_urls={ | ||
"Source": "https://github.com/Thriftpy/thriftpy2", | ||
}, | ||
license="MIT", | ||
zip_safe=False, | ||
long_description=open("README.rst").read(), | ||
install_requires=install_requires, | ||
tests_require=tornado_requires, | ||
python_requires='>=3.6', | ||
extras_require={ | ||
"dev": dev_requires, | ||
"tornado": tornado_requires | ||
}, | ||
cmdclass=cmdclass, | ||
ext_modules=ext_modules, | ||
include_package_data=True, | ||
classifiers=[ | ||
"Topic :: Software Development", | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
]) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.