-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
5324939
commit 5162600
Showing
7 changed files
with
180 additions
and
97 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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import os | ||
|
||
for f in os.listdir('dist'): | ||
if 'linux' in f: | ||
os.rename(os.path.join('dist', f), os.path.join('dist', f.replace('linux', 'manylinux2014'))) | ||
for f in os.listdir("dist"): | ||
if "linux" in f: | ||
os.rename( | ||
os.path.join("dist", f), | ||
os.path.join("dist", f.replace("linux", "manylinux2014")), | ||
) |
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,6 @@ | ||
# -*- coding: utf-8 -*- | ||
from pysproto._sproto import * | ||
from pysproto.sprotoparser import parse | ||
from pysproto.sprotodump import dump, parse_ast | ||
from pysproto.sprotoparser import parse | ||
|
||
__version__ = "0.1.0.rc1" | ||
__version__ = "0.1.0" |
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
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 |
---|---|---|
|
@@ -4,14 +4,15 @@ | |
from collections import defaultdict | ||
|
||
from Cython.Build import cythonize | ||
from setuptools import Extension, setup, find_packages | ||
from setuptools import Extension, find_packages, setup | ||
from setuptools.command.build_ext import build_ext | ||
|
||
BUILD_ARGS = defaultdict(lambda: ['-O3', '-g0']) | ||
BUILD_ARGS = defaultdict(lambda: ["-O3", "-g0"]) | ||
|
||
for compiler, args in [ | ||
('msvc', ['/EHsc', '/DHUNSPELL_STATIC', "/Oi", "/O2", "/Ot"]), | ||
('gcc', ['-O3', '-g0'])]: | ||
("msvc", ["/EHsc", "/DHUNSPELL_STATIC", "/Oi", "/O2", "/Ot"]), | ||
("gcc", ["-O3", "-g0"]), | ||
]: | ||
BUILD_ARGS[compiler] = args | ||
|
||
|
||
|
@@ -25,10 +26,12 @@ def build_extensions(self): | |
|
||
|
||
extensions = [ | ||
Extension("pysproto._sproto", ["pysproto/_sproto.pyx", f'sproto/sproto.c'], | ||
include_dirs=[f"./sproto"], | ||
library_dirs=[f"./sproto"], | ||
), | ||
Extension( | ||
"pysproto._sproto", | ||
["pysproto/_sproto.pyx", f"sproto/sproto.c"], | ||
include_dirs=[f"./sproto"], | ||
library_dirs=[f"./sproto"], | ||
), | ||
] | ||
|
||
|
||
|
@@ -38,14 +41,16 @@ def get_dis(): | |
|
||
|
||
def get_version() -> str: | ||
path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "pysproto", "__init__.py") | ||
path = os.path.join( | ||
os.path.abspath(os.path.dirname(__file__)), "pysproto", "__init__.py" | ||
) | ||
with open(path, "r", encoding="utf-8") as f: | ||
data = f.read() | ||
result = re.findall(r"(?<=__version__ = \")\S+(?=\")", data) | ||
return result[0] | ||
|
||
|
||
packages = find_packages(exclude=('test', 'tests.*', "test*")) | ||
packages = find_packages(exclude=("test", "tests.*", "test*")) | ||
|
||
|
||
def main(): | ||
|
@@ -63,12 +68,13 @@ def main(): | |
author="synodriver", | ||
author_email="[email protected]", | ||
python_requires=">=3.6", | ||
install_requires=["cython"], | ||
license='BSD', | ||
setup_requires=["cython"], | ||
install_requires=["pypeg2"], | ||
license="BSD", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Operating System :: OS Independent", | ||
'License :: OSI Approved :: BSD License', | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: C", | ||
"Programming Language :: Cython", | ||
"Programming Language :: Python", | ||
|
@@ -77,16 +83,20 @@ def main(): | |
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation :: CPython" | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
], | ||
include_package_data=True, | ||
zip_safe=False, | ||
cmdclass={'build_ext': build_ext_compiler_check}, | ||
ext_modules=cythonize(extensions, | ||
compiler_directives={"cdivision": True, | ||
"embedsignature": True, | ||
"boundscheck": False, | ||
"wraparound": False}), | ||
cmdclass={"build_ext": build_ext_compiler_check}, | ||
ext_modules=cythonize( | ||
extensions, | ||
compiler_directives={ | ||
"cdivision": True, | ||
"embedsignature": True, | ||
"boundscheck": False, | ||
"wraparound": False, | ||
}, | ||
), | ||
) | ||
|
||
|
||
|
Oops, something went wrong.