Skip to content

Commit

Permalink
build: Add build-system. Remove unnecessary pip installs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 2, 2022
1 parent 74f10e9 commit 60e8372
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: setup.cfg
- run: pip install .[test]
# Print the ijson backend, to make any errors easier to debug.
- run: python -c "import ijson; print(ijson.backend)"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
with:
python-version: 3.8
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: setup.cfg
- run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
- run: pip install .[test]
- run: pytest /tmp/test_requirements.py
- run: pip install --upgrade check-manifest setuptools
- run: pip install --upgrade check-manifest
- run: check-manifest
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install --upgrade setuptools wheel
- run: python setup.py sdist bdist_wheel
- run: pip install --upgrade build
- run: python -m build --sdist --wheel
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[tool.pylint.BASIC]
good-names = 'e,f,i,n,io' # exception, file, enumerate, number

Expand Down
50 changes: 50 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[metadata]
name = ocdskit
version = 1.1.3
author = Open Contracting Partnership
author_email = data@open-contracting.org
license = BSD
description = A suite of command-line tools for working with OCDS data
url = https://github.com/open-contracting/ocdskit
long_description = file: README.rst
classifiers =
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy

[options]
packages = find:
install_requires =
ijson>=2.5
jsonref
ocdsmerge>=0.6
ocdsextensionregistry>=0.1.2

[options.packages.find]
exclude =
tests
tests.*

[options.entry_points]
console_scripts =
ocdskit = ocdskit.__main__:main

[options.extras_require]
perf =
orjson>=3
test =
coveralls
jsonpointer
pytest
pytest-cov
pytest-vcr
docs =
furo
sphinx
sphinx-autobuild
56 changes: 0 additions & 56 deletions setup.py

This file was deleted.

0 comments on commit 60e8372

Please sign in to comment.