From e8f21c79b1da0f18f80cca863b684e8444d39fc5 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 17 Feb 2023 12:03:25 +1100 Subject: [PATCH] See #2762. --- .github/workflows/ci-ifcopenshell-pypi.yml | 2 +- src/ifcopenshell-python/Makefile | 20 +++++++++++++++++++- src/ifcopenshell-python/pyproject.toml | 2 +- src/ifcopenshell-python/setup.py | 7 ------- 4 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 src/ifcopenshell-python/setup.py diff --git a/.github/workflows/ci-ifcopenshell-pypi.yml b/.github/workflows/ci-ifcopenshell-pypi.yml index b0196f5654..e522504334 100644 --- a/.github/workflows/ci-ifcopenshell-pypi.yml +++ b/.github/workflows/ci-ifcopenshell-pypi.yml @@ -8,7 +8,7 @@ on: # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) # * * * * * - - cron: "10 4 16 * *" # 11min before utc midnight + - cron: "4 1 17 * *" # 11min before utc midnight env: major: 0 diff --git a/src/ifcopenshell-python/Makefile b/src/ifcopenshell-python/Makefile index 33c670497d..ab87347604 100644 --- a/src/ifcopenshell-python/Makefile +++ b/src/ifcopenshell-python/Makefile @@ -2,6 +2,22 @@ VERSION:=`date '+%y%m%d'` PYVERSION:=py310 PLATFORM:=linux +SED:=sed -i +ifeq ($(OS),Windows_NT) +HOSTOS:=win +else +UNAME_S:=$(shell uname -s) +ifeq ($(UNAME_S),Linux) +HOSTOS:=linux +endif +ifeq ($(UNAME_S),Darwin) +HOSTOS:=macos +PYTHON:=python3 +PATCH:=patch -d +SED:=sed -i '' -e +endif +endif + ifeq ($(PYVERSION), py36) PYNUMBER:=36 endif @@ -99,9 +115,11 @@ endif # distutils cannot access anything outside the cwd, so hackishly swap out the README.md cp README.md ../README.bak cp ../../README.md README.md + $(SED) "s/999999/$(VERSION)/" pyproject.toml python -m build + $(SED) "s/$(VERSION)/999999/" pyproject.toml mv ../README.bak README.md - cd dist && mv ifcopenshell-0.7.0-py3-none-any.whl ifcopenshell-0.7.0-$(VERSION)-$(PYVERSION)-none-$(PLATFORMTAG).whl + cd dist && mv ifcopenshell-0.7.0.$(VERSION)-py3-none-any.whl ifcopenshell-0.7.0.$(VERSION)-$(PYVERSION)-none-$(PLATFORMTAG).whl rm -rf dist/ifcopenshell rm -rf dist/ifcopenshell.egg-info rm -rf dist/ifcopenshell-0.7.0.tar.gz diff --git a/src/ifcopenshell-python/pyproject.toml b/src/ifcopenshell-python/pyproject.toml index 8d94dc23a6..28595d7a0d 100644 --- a/src/ifcopenshell-python/pyproject.toml +++ b/src/ifcopenshell-python/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] name = "ifcopenshell" -version = "0.7.0" +version = "0.7.0.999999" authors = [ { name="Dion Moult", email="dion@thinkmoult.com" }, ] diff --git a/src/ifcopenshell-python/setup.py b/src/ifcopenshell-python/setup.py deleted file mode 100644 index d02a347bb0..0000000000 --- a/src/ifcopenshell-python/setup.py +++ /dev/null @@ -1,7 +0,0 @@ -from setuptools import setup -from pathlib import Path - -cwd = Path(__file__).parent -long_description = (cwd / "README.md").read_text() - -setup(name="ifcopenshell", long_description=long_description, long_description_content_type="text/markdown")