From 41ad722c20341d259b08f46461c90d454898f8e4 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Sat, 24 Aug 2024 18:51:44 +0100 Subject: [PATCH 1/9] Add ocpsvg recipe --- recipes/ocpsvg/meta.yaml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 recipes/ocpsvg/meta.yaml diff --git a/recipes/ocpsvg/meta.yaml b/recipes/ocpsvg/meta.yaml new file mode 100644 index 0000000000000..71d864e98bdac --- /dev/null +++ b/recipes/ocpsvg/meta.yaml @@ -0,0 +1,45 @@ +{% set name = "ocpsvg" %} +{% set version = "0.2.1" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/ocpsvg-{{ version }}.tar.gz + sha256: 8a089249b52b0bff99cca9698af3d74ef678ced2359316f8c2a04aee9baafb46 + +build: + noarch: python + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + number: 0 + +requirements: + host: + - python >=3.9 + - setuptools >=45 + - wheel + - setuptools-scm >=6.2 + - pip + run: + - python >=3.9 + - cadquery + - ocp >=7.7.0 + - svgpathtools >=1.5.1,<2 + - svgelements >=1.9.1,<2 + +test: + imports: + - ocpsvg + commands: + - pip check + requires: + - pip + +about: + license: Apache-2.0 + license_file: LICENSE + +extra: + recipe-maintainers: + - ndevenish From b50b39f815197a751466718e66326ac0adb7c772 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Sat, 24 Aug 2024 19:05:48 +0100 Subject: [PATCH 2/9] Add GLU --- recipes/ocpsvg/yum_requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 recipes/ocpsvg/yum_requirements.txt diff --git a/recipes/ocpsvg/yum_requirements.txt b/recipes/ocpsvg/yum_requirements.txt new file mode 100644 index 0000000000000..25e12c57a3667 --- /dev/null +++ b/recipes/ocpsvg/yum_requirements.txt @@ -0,0 +1 @@ +mesa-libGLU-devel From 6fb09f94338893d25e11b2fbc6ecfdd71b917f5b Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Sat, 24 Aug 2024 19:55:36 +0100 Subject: [PATCH 3/9] Patch name of cadquery dependency so pip check works This package is called cadquery-ocp externally, as it includes OCP in the python dependency. --- recipes/ocpsvg/meta.yaml | 2 ++ recipes/ocpsvg/patch_pyproject.patch | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 recipes/ocpsvg/patch_pyproject.patch diff --git a/recipes/ocpsvg/meta.yaml b/recipes/ocpsvg/meta.yaml index 71d864e98bdac..8df34a17c76b6 100644 --- a/recipes/ocpsvg/meta.yaml +++ b/recipes/ocpsvg/meta.yaml @@ -8,6 +8,8 @@ package: source: url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/ocpsvg-{{ version }}.tar.gz sha256: 8a089249b52b0bff99cca9698af3d74ef678ced2359316f8c2a04aee9baafb46 + patches: + - patch_pyproject.patch build: noarch: python diff --git a/recipes/ocpsvg/patch_pyproject.patch b/recipes/ocpsvg/patch_pyproject.patch new file mode 100644 index 0000000000000..49d689470eb76 --- /dev/null +++ b/recipes/ocpsvg/patch_pyproject.patch @@ -0,0 +1,11 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -5,7 +5,7 @@ readme = "readme-pypi.md" + version = "0.2.1" + requires-python = ">=3.9" + dependencies = [ +- "cadquery-ocp >= 7.7.0", ++ "cadquery", + "svgpathtools >= 1.5.1, <2", + "svgelements >= 1.9.1, <2", + ] From 212eaac37f5ff82781d3a9b3d5264429a9a0f67c Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Sat, 24 Aug 2024 20:04:30 +0100 Subject: [PATCH 4/9] Replace pip check with pytest Some of the dependencies of this package don't pass pip check themselves --- recipes/ocpsvg/meta.yaml | 4 ++-- recipes/ocpsvg/patch_pyproject.patch | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 recipes/ocpsvg/patch_pyproject.patch diff --git a/recipes/ocpsvg/meta.yaml b/recipes/ocpsvg/meta.yaml index 8df34a17c76b6..a29db0b043b05 100644 --- a/recipes/ocpsvg/meta.yaml +++ b/recipes/ocpsvg/meta.yaml @@ -34,9 +34,9 @@ test: imports: - ocpsvg commands: - - pip check + - pytest -v tests/ requires: - - pip + - pytest about: license: Apache-2.0 diff --git a/recipes/ocpsvg/patch_pyproject.patch b/recipes/ocpsvg/patch_pyproject.patch deleted file mode 100644 index 49d689470eb76..0000000000000 --- a/recipes/ocpsvg/patch_pyproject.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -5,7 +5,7 @@ readme = "readme-pypi.md" - version = "0.2.1" - requires-python = ">=3.9" - dependencies = [ -- "cadquery-ocp >= 7.7.0", -+ "cadquery", - "svgpathtools >= 1.5.1, <2", - "svgelements >= 1.9.1, <2", - ] From 276a53dffe76d77ac9c924161a9c4a0a1b5dd421 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Sat, 24 Aug 2024 20:12:35 +0100 Subject: [PATCH 5/9] No patch --- recipes/ocpsvg/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/ocpsvg/meta.yaml b/recipes/ocpsvg/meta.yaml index a29db0b043b05..a5acfde040491 100644 --- a/recipes/ocpsvg/meta.yaml +++ b/recipes/ocpsvg/meta.yaml @@ -8,8 +8,6 @@ package: source: url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/ocpsvg-{{ version }}.tar.gz sha256: 8a089249b52b0bff99cca9698af3d74ef678ced2359316f8c2a04aee9baafb46 - patches: - - patch_pyproject.patch build: noarch: python From 3b2838299dfe4907f8b6c56cf3ec111a7c8e68d6 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Sat, 24 Aug 2024 20:34:24 +0100 Subject: [PATCH 6/9] Copy tests --- recipes/ocpsvg/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/ocpsvg/meta.yaml b/recipes/ocpsvg/meta.yaml index a5acfde040491..0d4e5a95dca3a 100644 --- a/recipes/ocpsvg/meta.yaml +++ b/recipes/ocpsvg/meta.yaml @@ -29,6 +29,8 @@ requirements: - svgelements >=1.9.1,<2 test: + source_files: + - tests imports: - ocpsvg commands: From 28b573326d3014b94d7c33107a70ec316f85bee6 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Sun, 25 Aug 2024 08:25:26 +0100 Subject: [PATCH 7/9] Remove lint --- recipes/ocpsvg/meta.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/ocpsvg/meta.yaml b/recipes/ocpsvg/meta.yaml index 0d4e5a95dca3a..754a85e6edd65 100644 --- a/recipes/ocpsvg/meta.yaml +++ b/recipes/ocpsvg/meta.yaml @@ -41,6 +41,13 @@ test: about: license: Apache-2.0 license_file: LICENSE + home: https://github.com/snoyer/ocpsvg + summary: | + Add SVG functionality (import and export) to higher level cadquery API + - works at the OCP level + - uses svgpathtools to convert SVG path strings to and from TopoDS_Edge, TopoDS_Wire, and TopoDS_Face objects + - uses svgelements to import TopoDS_Wire and TopoDS_Face objects from an SVG document + extra: recipe-maintainers: From b4e1ca51fb11cf22bc080acf0fb381c8c0dc3b94 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Tue, 27 Aug 2024 20:28:37 +0100 Subject: [PATCH 8/9] Remove mesa-libGLU-devel This caused the import tests to fail before, but :shrug: --- recipes/ocpsvg/yum_requirements.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 recipes/ocpsvg/yum_requirements.txt diff --git a/recipes/ocpsvg/yum_requirements.txt b/recipes/ocpsvg/yum_requirements.txt deleted file mode 100644 index 25e12c57a3667..0000000000000 --- a/recipes/ocpsvg/yum_requirements.txt +++ /dev/null @@ -1 +0,0 @@ -mesa-libGLU-devel From c0f32acc8201b75a779ab5d69e510e4826bc61dc Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Tue, 27 Aug 2024 23:41:08 -0400 Subject: [PATCH 9/9] try to depend on libgl at test time only --- recipes/ocpsvg/meta.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/recipes/ocpsvg/meta.yaml b/recipes/ocpsvg/meta.yaml index 754a85e6edd65..ba4733b0de64f 100644 --- a/recipes/ocpsvg/meta.yaml +++ b/recipes/ocpsvg/meta.yaml @@ -37,6 +37,15 @@ test: - pytest -v tests/ requires: - pytest + # The libgl dependency for the test section can likely be removed when + # the following https://github.com/conda-forge/ocp-feedstock/pull/50 + # gets merged in the ocp feedstock + # this helps avoid a yum dependency + # either with the yum dependency or with this, the end user is assumed + # to have X11 system dependencies installed + # this helps the user avoid to have a direct dependency on libgl + # from this package (it will be transitive from OCP once the PR gets merged) + - libgl # [linux] about: license: Apache-2.0