Skip to content

Add support for python 3.12 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rebuild .c files with version of cython that supports python 3.12
  • Loading branch information
zephyrj committed May 24, 2024
commit 64a9748e744409ba68726d158e8e3c56c40cb9eb
18 changes: 9 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
try:
from Cython.Distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
except ImportError:
from setuptools import Extension
USING_CYTHON = False
Expand Down Expand Up @@ -48,19 +49,18 @@

# _comp_args = ["-ggdb"]
_comp_args = ['-O2', '-g0', '-s'] if not ON_WINDOWS else None
cython_directives = {
compiler_directives = {
'embedsignature': True,
'boundscheck': False,
'optimize.use_switch': True,
'wraparound': False,
'language_level': 2,
}
cython_args = {
'cython_directives': cython_directives,
'cython_compile_time_env': {
'compiler_directives': compiler_directives,
'compile_time_env': {
'ON_WINDOWS': ON_WINDOWS,
}} \
if USING_CYTHON else {}
}}


runtime_library_dirs = ["$ORIGIN/."] if not SYSTEM_LIBSSH else None
Expand All @@ -79,8 +79,7 @@
libraries=_libs,
library_dirs=lib_dirs,
runtime_library_dirs=runtime_library_dirs,
extra_compile_args=_comp_args,
**cython_args
extra_compile_args=_comp_args
)
for i in range(len(sources))]

Expand All @@ -104,7 +103,7 @@
name='ssh-python',
version=versioneer.get_version(),
cmdclass=cmdclass,
url='https://github.com/ParallelSSH/ssh-python',
url='https://github.com/parallel-ssh/ssh-python',
license='LGPLv2.1',
author='Panos Kittenis',
author_email='22e889d8@opayq.com',
Expand All @@ -130,6 +129,7 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: System :: Shells',
'Topic :: System :: Networking',
'Topic :: Software Development :: Libraries',
Expand All @@ -140,6 +140,6 @@
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
],
ext_modules=extensions,
ext_modules=cythonize(extensions, **cython_args) if USING_CYTHON else extensions,
package_data=package_data,
)
Loading