Skip to content

Commit ffdee6b

Browse files
authored
Migrate from setuptools to hatch (#809)
1 parent 960193e commit ffdee6b

14 files changed

Lines changed: 86 additions & 3131 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
steps:
2020
- name: Checkout source
2121
uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 0
2224

2325
- name: Setup conda
2426
uses: conda-incubator/setup-miniconda@v3
@@ -82,6 +84,8 @@ jobs:
8284
runs-on: ubuntu-latest
8385
steps:
8486
- uses: actions/checkout@v5
87+
with:
88+
fetch-depth: 0
8589
- uses: actions/setup-python@v6
8690
with:
8791
python-version: "3.11"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var/
3232
*.egg-info/
3333
.installed.cfg
3434
*.egg
35+
gcsfs/_version.py
3536

3637
# PyInstaller
3738
# Usually these files are written by a python script from a template

.isort.cfg

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

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
3-
exclude: versioneer.py
43
repos:
54
- repo: https://github.com/pre-commit/pre-commit-hooks
65
rev: v6.0.0

MANIFEST.in

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

cloudbuild/setup_vm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ python3 -m venv env
1010
source env/bin/activate
1111

1212
pip install --upgrade pip > /dev/null
13-
pip install pytest pytest-timeout pytest-subtests pytest-asyncio fusepy google-cloud-storage > /dev/null
13+
pip install pytest pytest-timeout pytest-subtests pytest-asyncio build hatchling hatch-vcs fusepy google-cloud-storage > /dev/null
1414
pip install -e . > /dev/null

environment_gcsfs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ channels:
44
dependencies:
55
- python==3.11
66
- aiohttp
7+
- build
78
- crcmod
89
- decorator
910
- fsspec
@@ -14,6 +15,8 @@ dependencies:
1415
- google-cloud-core
1516
- google-cloud-storage
1617
- grpcio
18+
- hatchling
19+
- hatch-vcs
1720
- pytest
1821
- pytest-timeout
1922
- pytest-asyncio

gcsfs/__init__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import logging
22
import os
33

4-
from ._version import get_versions
4+
from ._version import __version__ # noqa: F401
55

66
logger = logging.getLogger(__name__)
7-
__version__ = get_versions()["version"]
8-
del get_versions
97
from .core import GCSFileSystem
108
from .mapping import GCSMap
119

@@ -25,7 +23,3 @@
2523
# TODO: GCSMap still refers to the original GCSFileSystem. This will be
2624
# addressed in a future update.
2725
__all__ = ["GCSFileSystem", "GCSMap"]
28-
29-
from . import _version
30-
31-
__version__ = _version.get_versions()["version"]

0 commit comments

Comments
 (0)