-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modularize libmambapy * Add test-libmambapy to Taskfile * Fix libmamba installation * Fix standalone libmambapy configuration * Change libmambapy layout * Add scikit-build * Fix libmambapy extension name * Add submodules shims * Fix libmambaoy tests * Fix stubgen * Adapt libmambapy tests to scikit-build * Read version from Python * Replace confusing names
- Loading branch information
1 parent
ed27c71
commit 0d42e81
Showing
25 changed files
with
256 additions
and
130 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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,34 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"wheel", | ||
"scikit-build>=0.13", | ||
"cmake>=3.18", | ||
"ninja", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "libmambapy" | ||
authors = [ | ||
{name = "Wolf Vollprecht"}, | ||
{name = "Adrien Delsalle"}, | ||
{name = "Jonas Haag"}, | ||
{name = "QuantStack", email = "info@quantstack.net"}, | ||
{name = "Other contributors"}, | ||
] | ||
maintainers = [ | ||
{name = "QuantStack", email = "info@quantstack.net"}, | ||
] | ||
description = "A fast library to interact with the Conda package ecosystem" | ||
requires-python = ">=3.7" | ||
keywords = ["mamba", "conda", "packaging"] | ||
license = {text = "BSD-3-Clause"} | ||
dependencies = [] | ||
dynamic = ["version"] | ||
[projet.url] | ||
Documentation = "https://mamba.readthedocs.io" | ||
Repository = "https://github.com/mamba-org/mamba/" | ||
|
||
[tool.setuptools] | ||
platforms = ["Windows", "Linux", "Mac OS X"] |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import setuptools | ||
import importlib.util | ||
import os | ||
import pathlib | ||
|
||
setuptools.setup() | ||
import skbuild | ||
import skbuild.constants | ||
|
||
__dir__ = pathlib.Path(__file__).parent.absolute() | ||
|
||
|
||
def CMAKE_INSTALL_DIR(): | ||
"""Where scikit-build configures CMAKE_INSTALL_PREFIX.""" | ||
return os.path.abspath(skbuild.constants.CMAKE_INSTALL_DIR()) | ||
|
||
|
||
def libmambapy_version(): | ||
"""Get the version of libmambapy from its version module.""" | ||
spec = importlib.util.spec_from_file_location( | ||
"libmambapy_version", __dir__ / "src/libmambapy/version.py" | ||
) | ||
ver = importlib.util.module_from_spec(spec) | ||
spec.loader.exec_module(ver) | ||
return ver.__version__ | ||
|
||
|
||
skbuild.setup( | ||
version=libmambapy_version(), | ||
packages=["libmambapy", "libmambapy.bindings"], | ||
package_dir={"": "src"}, | ||
package_data={"libmambapy": ["py.typed", "__init__.pyi"]}, | ||
cmake_languages=["CXX"], | ||
cmake_minimum_required_version="3.17", | ||
cmake_install_dir="src/libmambapy", # Must match package_dir layout | ||
cmake_args=[ | ||
f"-DMAMBA_INSTALL_PYTHON_EXT_LIBDIR={CMAKE_INSTALL_DIR()}/src/libmambapy", | ||
], | ||
) |
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,5 @@ | ||
import libmambapy.version | ||
from libmambapy.bindings.legacy import * # Legacy which used to combine everything | ||
|
||
# Define top-level attributes | ||
__version__ = libmambapy.version.__version__ |
Oops, something went wrong.