Skip to content

Commit efbd8b3

Browse files
committed
make work
1 parent d18dc58 commit efbd8b3

7 files changed

Lines changed: 23 additions & 54 deletions

File tree

.github/workflows/pip.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
run: python -m pip install --upgrade pip wheel setuptools conan
2424
- name: Install conan config
2525
run: conan config install .github/config/${{ matrix.os }}/conan
26-
- name: Setup conan remote
27-
run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan
2826
- name: Build and install
2927
run: pip install --verbose .[test]
3028
# TODO

.github/workflows/wheels.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
MACOSX_DEPLOYMENT_TARGET: 10.15
3939
CIBW_ARCHS_MACOS: auto universal2
4040
CIBW_SKIP: "*-win32 *-manylinux_i686"
41-
CIBW_BEFORE_BUILD: "pip install conan && conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan"
4241
CIBW_BUILD_VERBOSITY: 1
4342
- name: Verify clean directory
4443
run: git diff --exit-code

CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,4 @@ set(CMAKE_CXX_EXTENSIONS OFF)
88
find_package(odrcore REQUIRED)
99
find_package(pybind11 REQUIRED)
1010

11-
pybind11_add_module(pyodr src/cpp/pyodr.cpp)
12-
target_link_libraries(pyodr PRIVATE odrcore::odrcore)
13-
14-
install(
15-
TARGETS pyodr
16-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
17-
)
11+
add_subdirectory(src/pyodr)

pyproject.toml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,3 @@ requires = [
99
"skbuild-conan",
1010
]
1111
build-backend = "setuptools.build_meta"
12-
13-
[tool.mypy]
14-
files = "setup.py"
15-
python_version = "3.7"
16-
strict = true
17-
show_error_codes = true
18-
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
19-
warn_unreachable = true
20-
21-
[[tool.mypy.overrides]]
22-
module = ["ninja"]
23-
ignore_missing_imports = true
24-
25-
26-
[tool.pytest.ini_options]
27-
minversion = "6.0"
28-
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
29-
xfail_strict = true
30-
filterwarnings = [
31-
"error",
32-
"ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest",
33-
]
34-
testpaths = ["tests"]
35-
36-
[tool.cibuildwheel]
37-
test-command = "pytest {project}/tests"
38-
test-extras = ["test"]
39-
test-skip = ["*universal2:arm64"]
40-
# Setuptools bug causes collision between pypy and cpython artifacts
41-
before-build = "rm -rf {project}/build"
42-
43-
[tool.ruff]
44-
target-version = "py37"
45-
46-
[tool.ruff.lint]
47-
extend-select = [
48-
"B", # flake8-bugbear
49-
"I", # isort
50-
"PGH", # pygrep-hooks
51-
"RUF", # Ruff-specific
52-
"UP", # pyupgrade
53-
]

setup.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,20 @@
33
import subprocess
44

55

6-
subprocess.run(["conan", "remote", "add", "--index", "0", "odr", "https://artifactory.opendocument.app/artifactory/api/conan/conan"])
6+
conan_odr_remote = "https://artifactory.opendocument.app/artifactory/api/conan/conan"
7+
result = subprocess.run(["conan", "remote", "list"], check=True, capture_output=True, text=True)
8+
if conan_odr_remote not in result.stdout:
9+
print(f"Adding Conan remote {conan_odr_remote}")
10+
subprocess.run(
11+
[
12+
"conan",
13+
"remote",
14+
"add",
15+
"odr",
16+
conan_odr_remote,
17+
],
18+
check=True,
19+
)
720

821

922
setup(

src/pyodr/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pybind11_add_module(core core.cpp)
2+
target_link_libraries(core PRIVATE odrcore::odrcore)
3+
4+
install(
5+
TARGETS core
6+
LIBRARY DESTINATION src/pyodr
7+
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
namespace py = pybind11;
44

5-
PYBIND11_MODULE(pyodr, m) {
5+
PYBIND11_MODULE(core, m) {
66
m.attr("__version__") = "dev";
77
}

0 commit comments

Comments
 (0)