Skip to content

Commit

Permalink
Change build system
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-urdin committed Jun 28, 2022
1 parent b74f407 commit 2c6b8a5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python-gnocchiclient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
matrix:
env:
- docs-gnocchi-web
- build
- pep8
- py36
- py38
Expand Down
2 changes: 2 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ queue_rules:
- name: default
conditions:
- check-success=test (docs-gnocchi-web)
- check-success=test (build)
- check-success=test (pep8)
- check-success=test (py36)
- check-success=test (py38)
Expand All @@ -17,6 +18,7 @@ pull_request_rules:
- label!=work-in-progress
- '#approved-reviews-by>=1'
- check-success=test (docs-gnocchi-web)
- check-success=test (build)
- check-success=test (pep8)
- check-success=test (py36)
- check-success=test (py38)
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
requires = ["setuptools", "setuptools_scm", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
11 changes: 2 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools

# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass

setuptools.setup(
setup_requires=['pbr'],
pbr=True)
pbr=True,
py_modules=[])
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ envlist = py36,py38,py39,pep8,docs-gnocchi-web
skipsdist = True

[testenv]
basepython = python3
basepython =
py36: {env:TOXPYTHON:python3.6}
py38: {env:TOXPYTHON:python3.8}
py39: {env:TOXPYTHON:python3.9}
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
Expand All @@ -18,6 +21,11 @@ deps = .[test,openstack]
# TODO(tobias-urdin): Skip benchmark tests since they just hang right now.
commands = pifpaf run gnocchi -- pytest -k 'not test_benchmark_' {posargs:gnocchiclient/tests}

[testenv:build]
basepython = python3.8
deps = build
commands = python3 -m build

[testenv:pep8]
basepython = python3
deps = flake8
Expand Down

0 comments on commit 2c6b8a5

Please sign in to comment.