-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* src/pyscipopt/_version.py: New, single-source the version from here * pyproject.toml: Move metadata here from setup.py --------- Co-authored-by: Mohammed Ghannam <[email protected]>
- Loading branch information
Showing
5 changed files
with
36 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,37 @@ | ||
[build-system] | ||
requires = ['setuptools', 'cython >=0.21'] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "PySCIPOpt" | ||
description = "Python interface and modeling environment for SCIP" | ||
authors = [ | ||
{name = "Zuse Institute Berlin", email = "[email protected]"}, | ||
] | ||
dependencies = [] | ||
requires-python = ">=3.8" | ||
readme = "README.md" | ||
license = {text = "MIT"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Cython", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/SCIP-Interfaces/PySCIPOpt" | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = ["check"] | ||
testpaths = ["tests"] | ||
|
||
[tool.setuptools] | ||
include-package-data = false | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "pyscipopt._version.__version__"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
[tool:pytest] | ||
norecursedirs = check | ||
testpaths = tests | ||
|
||
[bdist_wheel] | ||
universal = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,11 +69,6 @@ | |
|
||
packagedir = os.path.join("src", "pyscipopt") | ||
|
||
with open(os.path.join(packagedir, "__init__.py"), "r") as initfile: | ||
version = re.search( | ||
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', initfile.read(), re.MULTILINE | ||
).group(1) | ||
|
||
try: | ||
from Cython.Build import cythonize | ||
except ImportError as err: | ||
|
@@ -106,28 +101,7 @@ | |
if use_cython: | ||
extensions = cythonize(extensions, compiler_directives={"language_level": 3, "linetrace": on_github_actions}) | ||
|
||
with open("README.md") as f: | ||
long_description = f.read() | ||
|
||
setup( | ||
name="PySCIPOpt", | ||
version=version, | ||
description="Python interface and modeling environment for SCIP", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/SCIP-Interfaces/PySCIPOpt", | ||
author="Zuse Institute Berlin", | ||
author_email="[email protected]", | ||
license="MIT", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"Intended Audience :: Education", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Cython", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
], | ||
ext_modules=extensions, | ||
packages=["pyscipopt"], | ||
package_dir={"pyscipopt": packagedir}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '4.4.0' | ||
from ._version import __version__ | ||
|
||
# required for Python 3.8 on Windows | ||
import os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '4.4.0' |