4 here = os.path.abspath(os.path.dirname(__file__))
7 with codecs.open(os.path.join(here, rel_path),
'r')
as fp:
12 with open(file_name,
"r")
as fh:
13 long_description = fh.read()
14 return long_description
19 from setuptools
import setup, Extension
20 from setuptools.command.build_ext
import build_ext
as build_ext_orig
30 for ext
in self.extensions:
35 cwd = pathlib.Path().absolute()
36 build_temp = pathlib.Path(self.build_temp)
37 build_temp.mkdir(parents=
True, exist_ok=
True)
38 extdir = pathlib.Path(self.get_ext_fullpath(ext.name))
39 extdir.mkdir(parents=
True, exist_ok=
True)
40 config =
'Debug' if self.debug
else 'Release'
44 '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' +
str(extdir.parent.absolute()),
45 '-DCMAKE_BUILD_TYPE=' + config
51 os.chdir(
str(build_temp))
52 self.spawn([
'cmake',
str(cwd)] + cmake_args)
54 self.spawn([
'cmake',
'--build',
'.'] + build_args)
60 author=
"Jalil Nourisa",
61 author_email=
"jalil.nourisa@gmail.com",
62 description=
"General-purpose agent-based modeling framework",
64 long_description_content_type=
"text/markdown",
65 url=
"https://github.com/janursa/CppyABM",
69 'build_ext': build_ext,
72 "Programming Language :: Python :: 3",
73 "License :: OSI Approved :: MIT License",
74 "Operating System :: OS Independent",
76 python_requires=
'>=3.6'