diff --git a/.github/workflows/ci-ifcclash-pypi.yaml b/.github/workflows/ci-ifcclash-pypi.yaml new file mode 100644 index 0000000000..9aa0349d0b --- /dev/null +++ b/.github/workflows/ci-ifcclash-pypi.yaml @@ -0,0 +1,48 @@ +name: ci-ifcclash-pypi + +on: + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # * * * * * + - cron: "0 0 18 * *" + workflow_dispatch: + +env: + major: 0 + minor: 0 + name: ifcopenshell + +jobs: + activate: + runs-on: ubuntu-latest + if: | + github.repository == 'IfcOpenShell/IfcOpenShell' + steps: + - name: Set env + run: echo ok go + + build: + needs: activate + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 # https://github.com/actions/setup-python + with: + python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax + - name: Compile + run: | + pip install build + cd src/ifcclash && + make dist + - name: Publish a Python distribution to PyPI + uses: ortega2247/pypi-upload-action@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + packages_dir: src/ifcclash/dist diff --git a/src/ifcclash/Makefile b/src/ifcclash/Makefile new file mode 100644 index 0000000000..ec05e23471 --- /dev/null +++ b/src/ifcclash/Makefile @@ -0,0 +1,34 @@ +# IfcClash - IFC-based clash detection. +# Copyright (C) 2020-2024 Dion Moult +# +# This file is part of IfcClash. +# +# IfcClash is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# IfcClash is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with IfcClash. If not, see . + +VERSION:=`date '+%y%m%d'` +SED:=sed -i +ifeq ($(UNAME_S),Darwin) +SED:=sed -i '' -e +endif + +.PHONY: qa +qa: + black . + +.PHONY: dist +dist: + rm -rf dist + $(SED) "s/999999/$(VERSION)/" pyproject.toml + python -m build + $(SED) "s/$(VERSION)/999999/" pyproject.toml diff --git a/src/ifcclash/pyproject.toml b/src/ifcclash/pyproject.toml new file mode 100644 index 0000000000..148c16a0e4 --- /dev/null +++ b/src/ifcclash/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "ifcclash" +version = "0.0.999999" +authors = [ + { name="Dion Moult", email="dion@thinkmoult.com" }, +] +description = "IFC clash detection library to handle intersections, collisions, and clearance checks" +readme = "README.md" +keywords = ["IFC", "clash", "BIM"] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", +] +dependencies = [ + "ifcopenshell", +] + +[project.urls] +Homepage = "http://ifcopenshell.org" +Documentation = "https://docs.ifcopenshell.org" +Issues = "https://github.com/IfcOpenShell/IfcOpenShell/issues" + +[tool.setuptools.packages.find] +include = ["ifcclash"] +exclude = ["test*"] diff --git a/src/ifccsv/pyproject.toml b/src/ifccsv/pyproject.toml index 4d33179f8f..94d69c0ec7 100644 --- a/src/ifccsv/pyproject.toml +++ b/src/ifccsv/pyproject.toml @@ -24,6 +24,5 @@ Homepage = "http://ifcopenshell.org" Documentation = "https://docs.ifcopenshell.org" Issues = "https://github.com/IfcOpenShell/IfcOpenShell/issues" -[tool.setuptools.packages.find] -include = ["ifccsv"] -exclude = ["test*"] +[tool.setuptools] +py-modules = ["ifccsv"] diff --git a/src/ifcpatch/Makefile b/src/ifcpatch/Makefile index d01a95b395..385ed3ac1c 100644 --- a/src/ifcpatch/Makefile +++ b/src/ifcpatch/Makefile @@ -1,20 +1,20 @@ -# BlenderBIM Add-on - OpenBIM Blender Add-on -# Copyright (C) 2022 Dion Moult +# IfcPatch - IFC patching utiliy +# Copyright (C) 2020, 2021, 2023 Dion Moult # -# This file is part of BlenderBIM Add-on. +# This file is part of IfcPatch. # -# BlenderBIM Add-on is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by +# IfcPatch is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# BlenderBIM Add-on is distributed in the hope that it will be useful, +# IfcPatch is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with BlenderBIM Add-on. If not, see . +# You should have received a copy of the GNU Lesser General Public License +# along with IfcPatch. If not, see . VERSION:=`date '+%y%m%d'` SED:=sed -i diff --git a/src/ifcpatch/pyproject.toml b/src/ifcpatch/pyproject.toml index 6ef101fe48..2cb7329226 100644 --- a/src/ifcpatch/pyproject.toml +++ b/src/ifcpatch/pyproject.toml @@ -10,7 +10,7 @@ authors = [ ] description = "IFC patching utility" readme = "README.md" -keywords = ["IFC", "IDS", "BIM"] +keywords = ["IFC", "BIM"] classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",