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 3e89861 commit c1ed4f4
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
with:
python-version: 3.8 # Google Colaboratory uses Python 3.8
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: setup.cfg
- run: pip install .[test]
- env:
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*.egg-info
/.coverage
/build
/dist
/docs/_build
/htmlcov
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
47 changes: 47 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[metadata]
name = ocdskingfishercolab
version = 0.3.9
author = Open Contracting Partnership
author_email = data@open-contracting.org
license = BSD
description = A set of utility functions for Google Colaboratory notebooks using OCDS data
url = https://github.com/open-contracting/kingfisher-colab
long_description = file: README.rst
classifiers =
License :: OSI Approved :: BSD License
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3.8
Programming Language :: Python :: Implementation :: CPython

[options]
packages = find:
install_requires =
flattentool
google-auth
gspread
gspread-dataframe
httplib2
ipython
ipython-sql~=0.4.0
notebook
oauth2client
pydrive2
requests
sqlalchemy

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

[options.extras_require]
test =
coveralls
pytest
pytest-cov
pandas
psycopg2-binary
docs =
furo
sphinx
sphinx-autobuild
53 changes: 0 additions & 53 deletions setup.py

This file was deleted.

0 comments on commit c1ed4f4

Please sign in to comment.