Skip to content

Commit

Permalink
Fix cython building
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard10 committed May 5, 2023
1 parent 3dc39b1 commit 8cae4aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# The short X.Y version.
version = '2.2'
# The full version, including alpha/beta/rc tags.
release = '2.2.0'
release = '2.2.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
33 changes: 10 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,6 @@ def run(self):
class BuildFailed(Exception):
pass

def construct_build_ext(build_ext):
"""
Thanks to https://stackoverflow.com/a/41785785/5069869 and https://github.com/Toblerity/Shapely/blob/master/setup.py
"""
class WrappedBuildExt(build_ext):
# This class allows C extension building to fail.
def run(self):
try:
build_ext.run(self)
except DistutilsPlatformError as x:
raise BuildFailed(x)

def build_extension(self, ext):
try:
build_ext.build_extension(self, ext)
except ext_errors as x:
raise BuildFailed(x)
return WrappedBuildExt


extras = {"forgi.visual":["matplotlib>=2.0"],
Expand All @@ -73,15 +55,20 @@ def build_extension(self, ext):
extras["all"]=list(itertools.chain(extras.values()))
setup_args = {
"zip_safe":False,
"cmdclass":{'build_py': build_py, 'build_ext':construct_build_ext(build_ext)},
"cmdclass":{'build_py': build_py, 'build_ext': build_ext},
"name":'forgi',
"version":'2.2.0',
"version":'2.2.1',
"description":'RNA Graph Library',
"author":'Bernhard Thiel, Peter Kerpedjiev',
"author_email":'[email protected]',
"license":'GNU GPL 3.0',
"url":'http://www.tbi.univie.ac.at/~pkerp/forgi/',
"ext_modules": [Extension("cytvec", sources=["forgi/threedee/utilities/cytvec.pyx"], extra_compile_args=['-O3', "-std=c++11"],
"ext_modules": [Extension("forgi.threedee.utilities.cytvec",
sources=["forgi/threedee/utilities/cytvec.pyx",
"forgi/threedee/utilities/broken_ml_core_py.pxd",
"forgi/threedee/utilities/broken_ml_core.cpp",
],
extra_compile_args=['-O3', "-std=c++11"],
language='c++' )],
"packages":['forgi', 'forgi.graph', 'forgi.threedee',
'forgi.threedee.model', 'forgi.utilities',
Expand Down Expand Up @@ -136,8 +123,8 @@ def build_extension(self, ext):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
}

Expand Down

0 comments on commit 8cae4aa

Please sign in to comment.