Skip to content

Commit

Permalink
Packaging with 'build' package
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Oct 22, 2024
1 parent 7efd933 commit e84ffa7
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 32 deletions.
1 change: 1 addition & 0 deletions .github/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
qgis-plugin-ci>=2.1.1,<3.0.0
build
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Build package
run: |
python setup.py sdist
python -m build --no-isolation --sdist
- name: Create release on GitHub
uses: ncipollo/[email protected]
Expand All @@ -67,4 +67,4 @@ jobs:
consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
tweet_body: "New version of Py-QGIS-WPS ${{ env.CI_COMMIT_TAG }} ⚙ for #QGIS https://github.com/3liz/py-qgis-wps/releases"
tweet_body: "New version of Py-QGIS-WPS ${{ env.CI_COMMIT_TAG }} ⚙ for #QGIS https://github.com/3liz/py-qgis-wps/releases"
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ stages:
stage: test
script:
- source ~/.bashrc
- make install install-tests
- make install install-dev
- pip list -l
- make test FLAVOR=$QGIS_FLAVOR
tags:
Expand Down
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include setup.py MANIFEST.in README.md VERSION
include requirements.txt
include MANIFEST.in README.md VERSION
include pyqgiswps/build.manifest
recursive-include pyqgiswps/schemas *
recursive-include pyqgiswps/html *
Expand Down
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ DEPTH=.

include $(DEPTH)/config.mk

BUILDDIR:=build
DIST:=${BUILDDIR}/dist
DIST:=dist

MANIFEST=pyqgiswps/build.manifest

Expand All @@ -31,8 +30,8 @@ deliver:
twine upload -r storage $(DIST)/*

dist: dirs manifest
rm -rf *.egg-info
$(PYTHON) setup.py sdist --dist-dir=$(DIST)
rm -rf *.egg-info
$(PYTHON) -m build --no-isolation --sdist --outdir=$(DIST)

clean:
rm -rf $(DIST) *.egg-info
Expand All @@ -44,14 +43,12 @@ test: lint
install:
pip install -U --upgrade-strategy=eager -e .

install-tests:
pip install -U --upgrade-strategy=eager -r tests/requirements.txt
install-dev:
pip install -U --upgrade-strategy=eager -r requirements.dev

install-doc:
pip install -U --upgrade-strategy=eager -r doc/requirements.txt

install-dev: install-tests install-doc

lint:
@ruff check --output-format=concise $(PYTHON_PKG) $(TESTDIR)

Expand All @@ -61,6 +58,8 @@ lint-preview:
lint-fix:
@ruff check --preview --fix $(PYTHON_PKG) $(TESTDIR)

autopep8: lint-fix

typing:
mypy --config=$(topsrcdir)/mypy.ini -p pyqgiswps

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN mkdir -p /opt/local/ \

COPY pyqgiswps py-qgis-wps/pyqgiswps
COPY pyqgisservercontrib py-qgis-wps/pyqgisservercontrib
COPY setup.py pyproject.toml VERSION py-qgis-wps/
COPY pyproject.toml VERSION py-qgis-wps/

# Create virtualenv for installing server
RUN mkdir -p /opt/local/ \
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "py-qgis-wps"
description = """
Py-Qgis-WPS is an implementation of the Web Processing Service
standard from the Open Geospatial Consortium. qgis-wps is
written in Python and is a fork of PyWPS 4.0.
"""
description = "Py-Qgis-WPS is an implementation of the Web Processing Service standard from the Open Geospatial Consortium"
readme = "README.md"
requires-python = ">= 3.10"
classifiers=[
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt → requirements.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ types-psycopg2
pipdeptree
lxml
lxml-stubs
build
10 changes: 0 additions & 10 deletions requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

0 comments on commit e84ffa7

Please sign in to comment.