-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from rmanhaeve/master
Move building of package to pyproject.toml.
- Loading branch information
Showing
91 changed files
with
12,474 additions
and
660 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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Python PySDD package | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_WINDOWS: auto ARM64 | ||
CIBW_SKIP: cp36-* cp37-* pp* *i686 *ppc64le *s390x *win32* | ||
CIBW_TEST_REQUIRES: pytest | ||
CIBW_TEST_COMMAND: "pytest {project}/tests" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_linux_armwheels: | ||
name: Build wheels on Linux Arm with QEMU | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_LINUX: aarch64 | ||
CIBW_SKIP: cp36-* cp37-* pp* *i686 *ppc64le *s390x *win32* | ||
CIBW_TEST_REQUIRES: pytest | ||
CIBW_TEST_COMMAND: "pytest {project}/tests" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-ubuntu-qemu-arm | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Prepare source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
- name: Build | ||
run: | | ||
python -m pip install build | ||
python -m build --sdist | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist-source | ||
path: dist/*.tar.gz | ||
|
||
|
||
upload_wheels: | ||
name: Upload wheels to PyPi | ||
runs-on: ubuntu-latest | ||
needs: [ build_wheels,build_sdist,build_linux_armwheels ] | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: dist-* | ||
merge-multiple: true | ||
path: dist | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages_dir: dist/ | ||
skip_existing: true |
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 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,4 +1,120 @@ | ||
[build-system] | ||
# Minimum requirements for the build system to execute. | ||
requires = ["setuptools", "wheel", "cython"] # PEP 508 specifications. | ||
requires = ["setuptools", "cython"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "PySDD" | ||
version = "1.0" | ||
description = "Sentential Decision Diagrams" | ||
authors = [ | ||
{ name = "Wannes Meert", email = "[email protected]" }, | ||
{ name = "Arthur Choi" }, | ||
] | ||
readme = "README.rst" | ||
license = { file = "LICENSE" } | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"cython", | ||
"numpy", | ||
] | ||
keywords = ["sdd, knowledge compilation"] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence" | ||
] | ||
|
||
[project.optional-dependencies] | ||
tests = ["pytest"] | ||
|
||
|
||
|
||
[project.urls] | ||
Homepage = "https://github.com/wannesm/PySDD" | ||
Documentation = "https://pysdd.readthedocs.io/en/latest/" | ||
|
||
[project.entry-points."console_scripts"] | ||
pysdd = "pysdd.cli:main" | ||
|
||
[tool.setuptools] | ||
packages=["pysdd"] | ||
|
||
[[tool.setuptools.ext-modules]] | ||
name = "pysdd.sdd" | ||
sources = [ | ||
"pysdd/sdd.pyx", | ||
"pysdd/lib/libsdd-2.0/src/util.c", | ||
"pysdd/lib/libsdd-2.0/src/verify.c", | ||
"pysdd/lib/libsdd-2.0/src/version.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/computed.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/count_and_size.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/gc.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/hash.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/memory.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/multiply.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/nodes.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/partitions.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/references.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/replace.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/shadows.c", | ||
"pysdd/lib/libsdd-2.0/src/basic/sort.c", | ||
"pysdd/lib/libsdd-2.0/src/manager/copy.c", | ||
"pysdd/lib/libsdd-2.0/src/manager/interface.c", | ||
"pysdd/lib/libsdd-2.0/src/manager/manager.c", | ||
"pysdd/lib/libsdd-2.0/src/manager/stats.c", | ||
"pysdd/lib/libsdd-2.0/src/manager/variables.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/apply.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/bits.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/cardinality.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/condition.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/copy.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/count.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/essential_vars.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/exists.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/exists_multiple.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/exists_multiple_static.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/forall.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/io.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/model_count.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/rename_vars.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/size.c", | ||
"pysdd/lib/libsdd-2.0/src/sdds/wmc.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_fragments/construction.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_fragments/moves.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_fragments/operations.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/cartesian_product.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/dissect.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/limits.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/op_left_rotate.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/op_right_rotate.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/op_swap.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/rollback.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_operations/split.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_search/auto.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_search/search.c", | ||
"pysdd/lib/libsdd-2.0/src/vtree_search/state.c", | ||
"pysdd/lib/libsdd-2.0/src/vtrees/compare.c", | ||
"pysdd/lib/libsdd-2.0/src/vtrees/edit.c", | ||
"pysdd/lib/libsdd-2.0/src/vtrees/io.c", | ||
"pysdd/lib/libsdd-2.0/src/vtrees/maps.c", | ||
"pysdd/lib/libsdd-2.0/src/vtrees/moves.c", | ||
"pysdd/lib/libsdd-2.0/src/vtrees/static.c", | ||
"pysdd/lib/libsdd-2.0/src/vtrees/vtree.c", | ||
"pysdd/lib/sdd-2.0/src/fnf/compiler.c", | ||
"pysdd/lib/sdd-2.0/src/fnf/fnf.c", | ||
"pysdd/lib/sdd-2.0/src/fnf/io.c", | ||
"pysdd/lib/sdd-2.0/src/fnf/utils.c", | ||
] | ||
include-dirs = [ | ||
"pysdd/lib/libsdd-2.0/include", | ||
"pysdd/lib/sdd-2.0/include", | ||
"pysdd/lib/sdd_extra/include", | ||
] | ||
|
||
[tool.cibuildwheel] | ||
environment = {CFLAGS="-std=c99 -O2 -finline-functions" } | ||
|
||
[tool.cibuildwheel.windows] | ||
environment = {CL = "/O2"} | ||
|
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,3 @@ | ||
.vs | ||
.sconsign.dblite | ||
*/__pycache__/* |
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,13 @@ | ||
Copyright 2013-2018, Regents of the University of California | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
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,54 @@ | ||
The Sentential Decision Diagram Package | ||
sdd version 2.0, January 8, 2018 | ||
http://reasoning.cs.ucla.edu/sdd | ||
|
||
This directory provides the source code for the SDD library. | ||
|
||
All source code provided is in the C programming language (and in | ||
particular, C99). | ||
|
||
COMPILATION | ||
|
||
The SDD library uses the SCons build tool for compiling the library | ||
(see http://scons.org). If SCons is installed on the system, the | ||
library can be compiled by running the following on the command line: | ||
|
||
scons | ||
|
||
(run this command in the same directory that contains the file | ||
SConstruct). This command compiles a static library (named libsdd.a) | ||
and a shared library (named libsdd.so on Linux, and named libsdd.dylib | ||
on Mac). Both will be found under the build directory. The following | ||
command: | ||
|
||
scons mode=debug | ||
|
||
produces libraries with debugging information included, found under | ||
the debug directory. Adding a -c flag to either of the above commands | ||
will clean the respective build. | ||
|
||
The debug build will enable assertions by default. To disable these | ||
assertions, run the command: | ||
|
||
scons mode=debug --disable-assertions | ||
|
||
A more expensive but more exhaustive debugging mode can be enabled by | ||
running the following command: | ||
|
||
scons mode=debug --enable-full-debug | ||
|
||
These options are ignored when compiling the library without the | ||
mode=debug option. | ||
|
||
AUTHORS | ||
|
||
The SDD Package was developed by Arthur Choi and Adnan Darwiche, of | ||
the Automated Reasoning Group at the University of California, Los | ||
Angeles. | ||
|
||
http://reasoning.cs.ucla.edu | ||
|
||
Feedback, bug reports, and questions can be sent to the email address | ||
|
||
[email protected] | ||
|
Oops, something went wrong.