clean up Makefile, Dockerfile, rtd config

This commit is contained in:
Elizabeth Esswein 2024-02-05 11:53:35 -05:00
parent 74c6dcd902
commit 41108d07bc
9 changed files with 18 additions and 109 deletions

View File

@ -4,9 +4,9 @@
version: 2
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.10"
python: "latest"
# Optionally build your docs in additional formats such as PDF
formats: []
@ -16,4 +16,4 @@ python:
- method: pip
path: .
extra_requirements:
- docs
- doc

View File

@ -1,4 +1,4 @@
FROM python:3.6
FROM python:python:3.12.1-slim-bookworm
RUN apt-get -y update && apt-get upgrade -yu
COPY . /tmp/SpiffWorkflow
RUN cd /tmp/SpiffWorkflow && make wheel && pip install dist/SpiffWorkflow*.whl

View File

@ -2,7 +2,7 @@ NAME=SpiffWorkflow
VERSION=`python setup.py --version`
PREFIX=/usr/local/
BIN_DIR=$(PREFIX)/bin
SITE_DIR=$(PREFIX)`python -c "import sys; from distutils.sysconfig import get_python_lib; print get_python_lib()[len(sys.prefix):]"`
SITE_DIR=$(PREFIX)`python -c "import sys; from distutils.sysconfig import get_python_lib; print(get_python_lib()[len(sys.prefix):])"`
###################################################################
# Standard targets.
@ -20,19 +20,7 @@ dist-clean: clean
.PHONY : doc
doc:
cd doc; make
install:
mkdir -p $(SITE_DIR)
./version.sh
export PYTHONPATH=$(SITE_DIR):$(PYTHONPATH); \
python setup.py install --prefix $(PREFIX) \
--install-scripts $(BIN_DIR) \
--install-lib $(SITE_DIR)
./version.sh --reset
uninstall:
# Sorry, Python's distutils support no such action yet.
cd doc; make html
.PHONY : tests
tests:
@ -61,36 +49,6 @@ tests-ind:
tests-timing:
@make tests-ind 2>&1 | ./scripts/test_times.py
###################################################################
# Package builders.
###################################################################
targz: clean
./version.sh
python setup.py sdist --formats gztar
./version.sh --reset
tarbz: clean
./version.sh
python setup.py sdist --formats bztar
./version.sh --reset
wheel: clean
./version.sh
python setup.py bdist_wheel --universal
./version.sh --reset
deb: clean
./version.sh
debuild -S -sa
cd ..; sudo pbuilder build $(NAME)_$(VERSION)-0ubuntu1.dsc; cd -
./version.sh --reset
dist: targz tarbz wheel
###################################################################
# Publishers.
###################################################################
dist-publish:
./version.sh
python setup.py bdist_wheel --universal upload
./version.sh --reset
python -m build --sdist --wheel --outdir dist/

View File

@ -16,4 +16,5 @@
# 02110-1301 USA
from .util.task import TaskState
from .workflow import Workflow
from .workflow import Workflow
from .version import __version__

1
SpiffWorkflow/version.py Normal file
View File

@ -0,0 +1 @@
__version__ = '3.0.0rc0'

View File

@ -1,4 +0,0 @@
"""
Warning: This file is automatically generated.
"""
__version__ = '@VERSION@'

View File

@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta"
[project]
name = "SpiffWorkflow"
version = "3.0.0rc0"
description = "A workflow framework and BPMN/DMN Processor"
authors = [
{name = "Sartography", email = "dan@sartography.com"},
@ -25,13 +24,17 @@ classifiers = [
dependencies = [
"lxml",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/sartography/SpiffWorkflow"
Documentation = "https://spiffworkflow.readthedocs.io"
[project.optional-dependencies]
doc = ["sphinx"]
doc = [
"sphinx",
"sphinx_rtd_theme",
]
dev = [
"build",
"coverage",
@ -40,6 +43,9 @@ dev = [
[tool.setuptools]
packages = ["SpiffWorkflow"]
[tool.setuptools.dynamic]
version = {attr = "SpiffWorkflow.__version__"}
[tool.setuptools.package-data]
"*" = ["schema/*.xsd"]

View File

@ -1,3 +0,0 @@
from setuptools import setup
setup()

View File

@ -1,50 +0,0 @@
#!/bin/sh
# Tag revisions like this:
# $ git tag -a -m "v0.2" v0.2
VERSION_IN=VERSION.in
VERSION_FILE=SpiffWorkflow/version.py
# Check that we are actually in a git managed project.
if [ ! -e .git -a -z "$1" ]; then
echo >&2 Not a git repository.
exit 1
fi
# Make sure that we have permission to modify the version file.
if [ -r $VERSION_FILE -a ! -w $VERSION_FILE ]; then
echo >&2 No permission to modify $VERSION_FILE.
exit 1
fi
# By default, get the version number from "git describe".
if [ ! -z "$1" ]; then
VERSION=$1
else
HEAD=`git log -1 --pretty=format:%H HEAD`
VERSION=`git describe $HEAD --tags --match "v[0-9]*" | sed 's/^v//;s/-[^\-]*$//;s/-/./' 2>/dev/null`
if [ -z "$VERSION" ]; then
echo >&2 No matching tag was found.
exit 1
fi
fi
# If the --reset switch was given, reset the version number to 'DEVELOPMENT'.
[ "$1" = "--reset" ] && VERSION='DEVELOPMENT'
# If there is no version file, we are already done.
echo Version is $VERSION
[ ! -r $VERSION_FILE ] && exit 0
# Check whether the version file already contains this number,
# and only touch it if there is a change to avoid changing
# the timestamp.
VERSION_FILE_TMP=`mktemp`
cat $VERSION_IN | sed "s/@VERSION@/$VERSION/g" > $VERSION_FILE_TMP
if diff -q $VERSION_FILE_TMP $VERSION_FILE; then
echo Version file unchanged.
rm $VERSION_FILE_TMP
exit 0
fi
mv $VERSION_FILE_TMP $VERSION_FILE
echo Version file updated.