Skip to content

Fix Fedora/RedHat installation location (#474) #510

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 2.8.12...4.0.0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to wait for symengine/symengine#2096 before this starts working. Will it be available right after it's merged or should we also wait for a release of the library?

Should we go with CMAKE_POLICY_VERSION_MINIMUM until symengine/symengine gets the fix?

if (POLICY CMP0057)
cmake_policy(SET CMP0057 NEW) # needed for llvm >= 16
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindPython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
endif()

execute_process(
COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths; print(get_paths()['purelib'])"
COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths; print(get_paths()['platlib'])"
OUTPUT_VARIABLE PYTHON_INSTALL_PATH_tmp
)
string(STRIP ${PYTHON_INSTALL_PATH_tmp} PYTHON_INSTALL_PATH_tmp)
Expand Down
16 changes: 12 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

if use_setuptools:
try:
from setuptools import setup
from setuptools import Extension, setup
from setuptools.command.install import install as _install
from setuptools.command.build_ext import build_ext as _build_ext
except ImportError:
Expand All @@ -36,7 +36,7 @@
from distutils.command.build import build as _build

if not use_setuptools:
from distutils.core import setup
from distutils.core import Extension, setup
from distutils.command.install import install as _install
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.build import build as _build
Expand Down Expand Up @@ -117,7 +117,7 @@ def cmake_build(self):

cmake_cmd = ["cmake", source_dir,
"-DCMAKE_BUILD_TYPE=" + cmake_build_type[0],
"-DSYMENGINE_INSTALL_PY_FILES=OFF",
"-DSYMENGINE_INSTALL_PY_FILES=ON",
]
cmake_cmd.extend(process_opts(cmake_opts))
if not path.exists(path.join(build_dir, "CMakeCache.txt")):
Expand Down Expand Up @@ -221,6 +221,13 @@ def finalize_options(self):

'''

ext_modules = []
packages = ['symengine', 'symengine.tests']
if platform.system() == 'Windows':
packages += ['symengine.lib']
else:
ext_modules += [Extension(name='symengine.lib', sources=[])]

setup(name="symengine",
version="0.14.0",
description="Python library providing wrappers to SymEngine",
Expand All @@ -232,7 +239,8 @@ def finalize_options(self):
url="https://github.com/symengine/symengine.py",
python_requires='>=3.9,<4',
zip_safe=False,
packages=['symengine', 'symengine.lib', 'symengine.tests'],
ext_modules=ext_modules,
packages=packages,
cmdclass = cmdclass,
classifiers=[
'License :: OSI Approved :: MIT License',
Expand Down
Loading