Share common makefile instructions, use venv for running build, and separate dist/build dirs

This commit is contained in:
Dion Moult
2024-07-18 23:43:12 +10:00
parent 237cd99e3b
commit 0ecc3d3e2a
17 changed files with 70 additions and 206 deletions
+3 -16
View File
@@ -16,23 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcDiff. If not, see <http://www.gnu.org/licenses/>.
VERSION:=$(shell cat ../../VERSION)
SED:=sed -i
ifeq ($(UNAME_S),Darwin)
SED:=sed -i '' -e
endif
PACKAGE_NAME:=ifcdiff.py
IS_MODULE:=true
include ../common.mk
.PHONY: qa
qa:
black .
.PHONY: dist
dist:
rm -rf dist
cp pyproject.toml pyproject.toml.bak
cp ifcdiff.py ifcdiff.py.bak
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' ifcdiff.py
python -m build
mv pyproject.toml.bak pyproject.toml
mv ifcdiff.py.bak ifcdiff.py