Skip to content

Commit

Permalink
Modernize packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
oldpatricka committed Jul 3, 2024
1 parent e3aa819 commit 4bcfc6c
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 1,892 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [3.6, 3.8, 3.9, "3.10", 3.12]
python: [3.8, 3.9, "3.10", 3.12]
extras: ["test", "test,queuable,sentry"]
steps:
- name: Setup Python
Expand All @@ -15,6 +15,8 @@ jobs:
python-version: ${{ matrix.python }}
- name: Check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
working-directory: ./client
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ publish-pypi:
script:
- cd client
- rm -rf dist
- python3 setup.py sdist bdist_wheel
- python -m build
- twine upload -r pypi --skip-existing dist/*
tags:
- {{PLANET_RUNNER_TAG}}
Expand Down
77 changes: 77 additions & 0 deletions client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[build-system]
requires = [
"setuptools",
"versioningit",
]
build-backend = "setuptools.build_meta"

[project]
name = "datalake"
authors = [
{name = "Brian Cavagnolo", email = "[email protected]"},
]
description = "datalake: a metadata-aware archive"
readme = "README.md"
requires-python = ">=3.6"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = [
'boto3>=1.9.68',
'memoized_property>=1.0.1',
'pyblake2>=0.9.3; python_version<"3.6"',
'click>=4.1',
'python-dotenv>=0.1.3',
'requests>=2.5',
'six>=1.10.0',
'python-dateutil>=2.4.2',
'pytz>=2015.4',
]
dynamic = ["version"]

[project.optional-dependencies]
test = [
'pytest<8.0.0',
'pytest-cov>=2.5.1,<4',
'moto[s3]>4,<5',
'twine<4.0.0',
'pip>=20.0.0,<22.0.0',
'wheel<0.38.0',
'flake8>=2.5.0,<4.1',
'responses<0.22.0',
]
# the queuable feature allows users to offload their datalake pushes
# to a separate uploader process.
queuable = [
'inotify_simple>=1.3.5',
]
sentry = [
'raven>=5.0.0',
]

[project.scripts]
datalake = "datalake.scripts.cli:cli"

[tool.setuptools.packages.find]
exclude = ["test"]


[tool.versioningit.format]
distance = "{base_version}+{distance}.{vcs}{rev}"
# Example formatted version: 1.2.3+42.ge174a1f

dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
# Example formatted version: 1.2.3+42.ge174a1f.dirty

distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
# Example formatted version: 1.2.3+42.ge174a1f.dirty

[tool.pytest.ini_options]
addopts = "--cov=planet.mc_client --cov-config .coveragerc"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')"
]
6 changes: 0 additions & 6 deletions client/setup.cfg

This file was deleted.

62 changes: 0 additions & 62 deletions client/setup.py

This file was deleted.

Loading

0 comments on commit 4bcfc6c

Please sign in to comment.