Skip to content

Commit dc6ea19

Browse files
authored
Merge pull request tahoe-lafs#1395 from meejah/4133.packaging-disaster-zone
4133: use declarative build via pyproject.toml and hatch
2 parents e24b9ec + 85335f1 commit dc6ea19

File tree

15 files changed

+321
-563
lines changed

15 files changed

+321
-563
lines changed

.circleci/config.yml

Lines changed: 6 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ dockerhub-auth-template: &DOCKERHUB_AUTH
4848
<<: *DOCKERHUB_CONTEXT
4949
- "build-image-fedora-35":
5050
<<: *DOCKERHUB_CONTEXT
51-
- "build-image-oraclelinux-8":
52-
<<: *DOCKERHUB_CONTEXT
5351
# Restore later as PyPy38
5452
#- "build-image-pypy27-buster":
5553
# <<: *DOCKERHUB_CONTEXT
@@ -88,12 +86,8 @@ workflows:
8886
- "ubuntu-22-04":
8987
{}
9088

91-
# Equivalent to RHEL 8; CentOS 8 is dead.
92-
- "oraclelinux-8":
93-
{}
94-
9589
- "nixos":
96-
name: "<<matrix.pythonVersion>>"
90+
name: "nixos-<<matrix.pythonVersion>>"
9791
nixpkgs: "nixpkgs-unstable"
9892
matrix:
9993
parameters:
@@ -229,7 +223,7 @@ jobs:
229223
# version-specific binary packages so include the Python version
230224
# in this key, as well as the canonical source of our
231225
# dependencies.
232-
- &CACHE_KEY "pip-packages-v1-<< parameters.pythonVersion >>-{{ checksum \"setup.py\" }}"
226+
- &CACHE_KEY "pip-packages-v1-<< parameters.pythonVersion >>-{{ checksum \"pyproject.toml\" }}"
233227

234228
- "run":
235229
name: "Fix $env:PATH"
@@ -257,9 +251,6 @@ jobs:
257251
# doesn't cost us anything extra and saves us effort next time.
258252
name: "(Maybe) Build Wheels"
259253
command: |
260-
python -m pip install setuptools # Some Pythons for Windows do not come with setuptools
261-
python setup.py update_version # Cheat to win a race about writing _version.py
262-
263254
if ((Test-Path .\wheelhouse) -and (Test-Path .\wheelhouse\*)) {
264255
echo "Found populated wheelhouse, skipping wheel building."
265256
} else {
@@ -278,7 +269,7 @@ jobs:
278269
name: "Install Dependencies"
279270
environment:
280271
# By this point we should no longer need an index.
281-
PIP_NO_INDEX: "1"
272+
## PIP_NO_INDEX: "1"
282273
command: |
283274
python -m pip install .[testenv] .[test]
284275
@@ -543,37 +534,6 @@ jobs:
543534
<<: *UTF_8_ENVIRONMENT
544535
TAHOE_LAFS_TOX_ENVIRONMENT: "py310"
545536

546-
oraclelinux-8: &RHEL_DERIV
547-
docker:
548-
- <<: *DOCKERHUB_AUTH
549-
image: "tahoelafsci/oraclelinux:8-py3.8"
550-
user: "nobody"
551-
552-
environment:
553-
<<: *UTF_8_ENVIRONMENT
554-
TAHOE_LAFS_TOX_ENVIRONMENT: "py38"
555-
556-
# pip cannot install packages if the working directory is not readable.
557-
# We want to run a lot of steps as nobody instead of as root.
558-
working_directory: "/tmp/project"
559-
560-
steps:
561-
- "checkout"
562-
- run: *SETUP_VIRTUALENV
563-
- run: *RUN_TESTS
564-
- store_test_results: *STORE_TEST_RESULTS
565-
- store_artifacts: *STORE_TEST_LOG
566-
- store_artifacts: *STORE_ELIOT_LOG
567-
- store_artifacts: *STORE_OTHER_ARTIFACTS
568-
- run: *SUBMIT_COVERAGE
569-
570-
fedora-35:
571-
<<: *RHEL_DERIV
572-
docker:
573-
- <<: *DOCKERHUB_AUTH
574-
image: "tahoelafsci/fedora:35-py3"
575-
user: "nobody"
576-
577537
nixos:
578538
parameters:
579539
nixpkgs:
@@ -701,14 +661,6 @@ jobs:
701661
PYTHON_VERSION: "3.10"
702662

703663

704-
build-image-oraclelinux-8:
705-
<<: *BUILD_IMAGE
706-
707-
environment:
708-
DISTRO: "oraclelinux"
709-
TAG: "8"
710-
PYTHON_VERSION: "3.8"
711-
712664
build-image-fedora-35:
713665
<<: *BUILD_IMAGE
714666

@@ -743,6 +695,9 @@ executors:
743695
- <<: *DOCKERHUB_AUTH
744696
image: "nixos/nix:2.16.1"
745697
environment:
698+
# currently, all NixOS builds are broken; ignore them
699+
ALLOWED_FAILURE: "yes"
700+
746701
# CACHIX_AUTH_TOKEN is manually set in the CircleCI web UI and allows us
747702
# to push to CACHIX_NAME. CACHIX_NAME tells cachix which cache to push
748703
# to.
@@ -787,14 +742,6 @@ commands:
787742
788743
- "checkout"
789744

790-
- "run":
791-
# The Nix package doesn't know how to do this part, unfortunately.
792-
name: "Generate version"
793-
command: |
794-
nix-shell \
795-
-p 'python3.withPackages (ps: [ ps.setuptools ])' \
796-
--run 'python setup.py update_version'
797-
798745
- "run":
799746
name: "Build Package"
800747
command: |

.circleci/create-virtualenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ virtualenv --python "${PYTHON}" "${BOOTSTRAP_VENV}"
2626
PIP="${BOOTSTRAP_VENV}/bin/pip"
2727

2828
# Tell pip where it can find any existing wheels.
29-
export PIP_FIND_LINKS="file://${WHEELHOUSE_PATH}"
29+
##export PIP_FIND_LINKS="file://${WHEELHOUSE_PATH}"
3030

3131
# Get "certifi" to avoid bug #2913. Basically if a `setup_requires=...` causes
3232
# a package to be installed (with setuptools) then it'll fail on certain

.circleci/populate-wheelhouse.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ LANG="en_US.UTF-8" "${PIP}" \
3030
wheel \
3131
--wheel-dir "${WHEELHOUSE_PATH}" \
3232
"${PROJECT_ROOT}"[testenv] \
33-
"${PROJECT_ROOT}"[test]
33+
"${PROJECT_ROOT}"[test] \
34+
"${PROJECT_ROOT}"[build]

.circleci/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ TIMEOUT="timeout --kill-after 1m 45m"
6767
# via tox and then scraping it out is hideous and failure prone.
6868
export SUBUNITREPORTER_OUTPUT_PATH="${SUBUNIT2}"
6969
export TAHOE_LAFS_TRIAL_ARGS="${TAHOE_LAFS_TRIAL_ARGS:---reporter=subunitv2-file --rterrors}"
70-
export PIP_NO_INDEX="1"
70+
##export PIP_NO_INDEX="1"
7171

7272
# Make output unbuffered, so progress reports from subunitv2-file get streamed
7373
# and notify CircleCI we're still alive.

.circleci/setup-virtualenv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ TAHOE_LAFS_TOX_ARGS=$1
2525
shift || :
2626

2727
# Tell pip where it can find any existing wheels.
28-
export PIP_FIND_LINKS="file://${WHEELHOUSE_PATH}"
29-
export PIP_NO_INDEX="1"
28+
##export PIP_FIND_LINKS="file://${WHEELHOUSE_PATH}"
29+
##export PIP_NO_INDEX="1"
3030

3131
# Get everything else installed in it, too.
3232
"${BOOTSTRAP_VENV}"/bin/tox \

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171

7272
- name: Install Python packages
7373
run: |
74-
pip install --upgrade tox tox-gh-actions setuptools
74+
pip install --upgrade tox tox-gh-actions
7575
pip list
7676
7777
- name: Display tool versions
@@ -95,13 +95,13 @@ jobs:
9595
- name: Upload eliot.log
9696
uses: actions/upload-artifact@v4
9797
with:
98-
name: "eliot-${{ matrix.os }}-Python-${{ matrix.python-version }}.log"
98+
name: "eliot-${{ matrix.os }}-python-${{ matrix.python-version }}.log"
9999
path: eliot.log
100100

101101
- name: Upload trial log
102102
uses: actions/upload-artifact@v4
103103
with:
104-
name: "test-${{ matrix.os }}-Python-${{ matrix.python-version }}.log"
104+
name: "test-${{ matrix.os }}-python-${{ matrix.python-version }}.log"
105105
path: _trial_temp/test.log
106106

107107
# Upload this job's coverage data to Coveralls. While there is a GitHub
@@ -233,7 +233,7 @@ jobs:
233233
uses: actions/upload-artifact@v4
234234
if: failure()
235235
with:
236-
name: "integration.eliot-${{ matrix.os }}-Python-${{ matrix.python-version }}.json"
236+
name: "integration.eliot-${{ matrix.os }}-python-${{ matrix.python-version }}.json"
237237
path: integration.eliot.json
238238

239239
packaging:

MANIFEST.in

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

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Once ``tahoe --version`` works, see `How to Run Tahoe-LAFS <docs/running.rst>`__
5656
🐍 Python 2
5757
-----------
5858

59-
Python 3.8 or later is required.
59+
Python 3.9 or later is required.
6060
If you are still using Python 2.7, use Tahoe-LAFS version 1.17.1.
6161

6262

integration/test_tor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ def test_anonymous_client(reactor, request, temp_dir, flog_gatherer, tor_network
161161
yield util.await_client_ready(normie)
162162

163163
anonymoose = yield _create_anonymous_node(reactor, 'anonymoose', 8102, request, temp_dir, flog_gatherer, tor_network, introducer_furl, 1)
164-
yield util.await_client_ready(anonymoose, minimum_number_of_servers=1, timeout=600)
164+
yield util.await_client_ready(anonymoose, minimum_number_of_servers=1, timeout=1200)
165165

166166
yield upload_to_one_download_from_the_other(reactor, temp_dir, normie, anonymoose)

newsfragments/4133.installation

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Now using the "hatch" build system, and pyproject.toml (exclusively)

0 commit comments

Comments
 (0)