Skip to content

Commit 45c556a

Browse files
oldpatrickabcavagnolo
authored andcommitted
Modernize packaging
1 parent f0d209f commit 45c556a

File tree

6 files changed

+81
-1892
lines changed

6 files changed

+81
-1892
lines changed

.github/workflows/actions.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-20.04
77
strategy:
88
matrix:
9-
python: [3.6, 3.8, 3.9, "3.10", 3.12]
9+
python: [3.8, 3.9, "3.10", 3.12]
1010
extras: ["test", "test,queuable,sentry"]
1111
steps:
1212
- name: Setup Python
@@ -15,6 +15,8 @@ jobs:
1515
python-version: ${{ matrix.python }}
1616
- name: Check out repository code
1717
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
1820
- name: Test
1921
working-directory: ./client
2022
run: |

.gitlab-ci.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ publish-pypi:
2727
script:
2828
- cd client
2929
- rm -rf dist
30-
- python3 setup.py sdist bdist_wheel
30+
- python -m build
3131
- twine upload -r pypi --skip-existing dist/*
3232
tags:
3333
- {{PLANET_RUNNER_TAG}}

client/pyproject.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"versioningit",
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
[project]
9+
name = "datalake"
10+
authors = [
11+
{name = "Brian Cavagnolo", email = "[email protected]"},
12+
]
13+
description = "datalake: a metadata-aware archive"
14+
readme = "README.md"
15+
requires-python = ">=3.8"
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Environment :: Console",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3",
22+
]
23+
dependencies = [
24+
'boto3>=1.9.68',
25+
'memoized_property>=1.0.1',
26+
'pyblake2>=0.9.3; python_version<"3.6"',
27+
'click>=4.1',
28+
'python-dotenv>=0.1.3',
29+
'requests>=2.5',
30+
'six>=1.10.0',
31+
'python-dateutil>=2.4.2',
32+
'pytz>=2015.4',
33+
]
34+
dynamic = ["version"]
35+
36+
[project.optional-dependencies]
37+
test = [
38+
'pytest<8.0.0',
39+
'pytest-cov>=2.5.1,<4',
40+
'moto[s3]>4,<5',
41+
'twine<4.0.0',
42+
'pip>=20.0.0,<22.0.0',
43+
'wheel<0.38.0',
44+
'flake8>=2.5.0,<4.1',
45+
'responses<0.22.0',
46+
]
47+
# the queuable feature allows users to offload their datalake pushes
48+
# to a separate uploader process.
49+
queuable = [
50+
'inotify_simple>=1.3.5',
51+
]
52+
sentry = [
53+
'raven>=5.0.0',
54+
]
55+
56+
[project.scripts]
57+
datalake = "datalake.scripts.cli:cli"
58+
59+
[tool.setuptools.packages.find]
60+
exclude = ["test"]
61+
62+
63+
[tool.versioningit.format]
64+
distance = "{base_version}+{distance}.{vcs}{rev}"
65+
# Example formatted version: 1.2.3+42.ge174a1f
66+
67+
dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
68+
# Example formatted version: 1.2.3+42.ge174a1f.dirty
69+
70+
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
71+
# Example formatted version: 1.2.3+42.ge174a1f.dirty
72+
73+
[tool.pytest.ini_options]
74+
addopts = "--cov=planet.mc_client --cov-config .coveragerc"
75+
markers = [
76+
"slow: marks tests as slow (deselect with '-m \"not slow\"')"
77+
]

client/setup.cfg

Lines changed: 0 additions & 6 deletions
This file was deleted.

client/setup.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)