Skip to content

Commit 03918d1

Browse files
committed
install py files from cmake
1 parent 6da52eb commit 03918d1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

setup.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
if use_setuptools:
2626
try:
27-
from setuptools import Extension, setup
27+
from setuptools import setup
2828
from setuptools.command.install import install as _install
2929
from setuptools.command.build_ext import build_ext as _build_ext
3030
except ImportError:
@@ -36,14 +36,13 @@
3636
from distutils.command.build import build as _build
3737

3838
if not use_setuptools:
39-
from distutils.core import Extension, setup
39+
from distutils.core import setup
4040
from distutils.command.install import install as _install
4141
from distutils.command.build_ext import build_ext as _build_ext
4242
from distutils.command.build import build as _build
4343

4444
cmake_opts = [("PYTHON_BIN", sys.executable),
45-
("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "yes"),
46-
("CMAKE_POLICY_VERSION_MINIMUM", "3.5")]
45+
("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "yes")]
4746
cmake_generator = [None]
4847
cmake_build_type = ["Release"]
4948

@@ -118,7 +117,7 @@ def cmake_build(self):
118117

119118
cmake_cmd = ["cmake", source_dir,
120119
"-DCMAKE_BUILD_TYPE=" + cmake_build_type[0],
121-
"-DSYMENGINE_INSTALL_PY_FILES=OFF",
120+
"-DSYMENGINE_INSTALL_PY_FILES=ON",
122121
]
123122
cmake_cmd.extend(process_opts(cmake_opts))
124123
if not path.exists(path.join(build_dir, "CMakeCache.txt")):
@@ -233,8 +232,7 @@ def finalize_options(self):
233232
url="https://github.com/symengine/symengine.py",
234233
python_requires='>=3.9,<4',
235234
zip_safe=False,
236-
ext_modules=[Extension(name='symengine.lib', sources=[])],
237-
packages=['symengine', 'symengine.tests'],
235+
packages=[],
238236
cmdclass = cmdclass,
239237
classifiers=[
240238
'License :: OSI Approved :: MIT License',

0 commit comments

Comments
 (0)