Skip to content

Commit

Permalink
Add setup.py script
Browse files Browse the repository at this point in the history
  • Loading branch information
Theelx committed Aug 18, 2022
1 parent 57552ce commit f92c3c3
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import os

try:
from Cython.Build import cythonize
except (ImportError, NameError):
# skip cythonizing
cythonize = lambda x: 0
from setuptools import setup, Extension

with open("README.md", "r+") as f:
long_description = f.read()

setup(
name="pybase122",
version="0.1.0",
description="pybase122: Encode and decode base122 data quickly and easily!",
license="The Unlicense",
url="https://github.com/Theelx/pybase122",
long_description=long_description,
long_description_content_type="text/markdown",
classifiers=[
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"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",
],
setup_requires=["Cython>=3.0.0a11"],
python_requires=">=3.5",
ext_modules=cythonize(
Extension(
"cybase122",
["cybase122.pyx"],
language="c++",
# consider including -march=native if it makes a speed difference
# and if portability isn't a concern for users
extra_compile_args=["-Wno-sign-compare", "-flto", "-pipe"],
compiler_directives={'language_level': 3, "infer_types": True}
)
),
)

0 comments on commit f92c3c3

Please sign in to comment.