-
Notifications
You must be signed in to change notification settings - Fork 253
Expand file tree
/
Copy pathpyproject.toml
More file actions
169 lines (152 loc) · 4.43 KB
/
pyproject.toml
File metadata and controls
169 lines (152 loc) · 4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# OpenCog AtomSpace pyproject.toml
# Meant for use in pip python virtual envs.
#
# IMPORTANT PREREQUISITES:
# First, install System dependencies (before building cogutil and atomspace):
# Ubuntu/Debian: apt install libboost-all-dev cmake guile-3.0-dev pkg-config cxxtest
# CentOS/RHEL: yum install boost-devel cmake3 guile30-devel pkgconfig cxxtest
#
# Next, before building AtomSpace, you MUST first build and install cogutil:
#
# 1. Clone cogutil:
# git clone https://github.com/opencog/cogutil.git
# cd cogutil
#
# 2. Build and install cogutil:
# mkdir build && cd build
# cmake ..
# make -j
# sudo make install
# sudo ldconfig # Update library cache
#
# 3. Verify cogutil installation:
# pkg-config --exists cogutil && echo "cogutil found" || echo "cogutil NOT found"
#
# 4. Then proceed with the AtomSpace build in the python venv:
# python3 -m venv as-test-venv
# source as-test-venv/bin/activate
# pip install . -v
#
[build-system]
requires = [
"py-build-cmake~=0.1.8",
"pybind11",
"cython>=0.23",
"cmake>=3.0.2",
"wheel",
]
build-backend = "py_build_cmake.build"
# Match version number with opencog/atomspace/version.h
[project]
name = "atomspace"
version = "5.2.0"
description = "The AtomSpace Hypergraph Database"
readme = "README.md"
license = "AGPL-3.0-or-later"
license-files = ["LICEN[CS]E*"]
authors = [
{ name="OpenCog Development", email="opencog@googlegroups.com" },
]
maintainers = [
{ name="OpenCog Development", email="opencog@googlegroups.com" },
]
keywords = [
"knowledge-representation",
"graph-database",
"hypergraph",
"metagraph",
"pattern-matching",
"symbolic-ai",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dependencies = [
"pytest", # For testing
]
[project.optional-dependencies]
dev = [
"cxxtest",
"pytest",
"build",
]
[project.urls]
Homepage = "https://github.com/opencog/atomspace"
Issues = "https://github.com/opencog/atomspace/issues"
Documentation = "https://wiki.opencog.org/w/AtomSpace"
Repository = "https://github.com/opencog/atomspace"
[tool.py-build-cmake.module]
name = "opencog"
[tool.py-build-cmake.sdist]
include = [
"CMakeLists.txt",
"cmake/**/*",
"opencog/**/*",
"tests/**/*",
"examples/**/*",
"lib/**/*",
"*.md",
"LICENSE",
]
exclude = [
"build/**/*",
"**/__pycache__/**/*",
"**/*.pyc",
"**/.git/**/*",
]
[tool.py-build-cmake.cmake]
minimum_version = "3.12"
build_type = "Release"
source_path = "."
build_path = "build"
build_tool_args = ["-j"]
# The pip venv cannot find the cython executable. I don't know why.
# So hack around this by force-setting it.
# Failure to set ${CMAKE_INSTALL_PREFIX} results in assorted
# `Permission denied.` errors.
# Ditto for ${GUILE_SITE_DIR}
args = [
"-DCYTHON_EXECUTABLE=/usr/bin/cython",
"-DCMAKE_INSTALL_PREFIX=${VIRTUAL_ENV}",
"-DGUILE_SITE_DIR=${VIRTUAL_ENV}/share/guile/site/3.0/",
]
# Need to install everything, and not just the python bindings.
install_components = ["Unspecified"]
# install_components = ["PythonBindings"]
# Build only for Linux
[tool.cibuildwheel]
build = "cp3*-linux_x86_64"
skip = "cp35-* pp*" # Skip Python 3.5 and PyPy
# Install system dependencies for AtomSpace
before-all = [
# Ubuntu/Debian dependencies
"apt-get update && apt-get install -y libboost-all-dev cmake guile-3.0-dev || true",
# CentOS/RHEL dependencies
"yum install -y boost-devel cmake3 guile30-devel || true",
]
# Test the wheel
test-requires = ["pytest"]
test-command = "python -c 'import opencog.atomspace; print(\"AtomSpace import successful\")'"
# Pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests/cython"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
# Don't create __pycache__ directories
cache_dir = ".pytest_cache"