Skip to content

Commit 27c2db2

Browse files
authored
Update pantsbuild(.org) -> pex-tool(.org). (#2359)
Also add a bespoke CONTRIBUTING.md instead of pointing off to the pantsbuild.org contributing docs.
1 parent 79a4d86 commit 27c2db2

File tree

372 files changed

+528
-474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

372 files changed

+528
-474
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
_PEX_TEST_POS_ARGS: "--color --devpi --devpi-timeout 15.0 --shutdown-devpi -vvs"
99
# We use this to skip exposing same-versioned Pythons present on Linux hosts. These otherwise can
1010
# collide when attempting to load libpython<major>.<minor><flags>.so and lead to mysterious errors
11-
# importing builtins like `fcntl` as outlined in https://github.com/pantsbuild/pex/issues/1391.
11+
# importing builtins like `fcntl` as outlined in https://github.com/pex-tool/pex/issues/1391.
1212
_PEX_TEST_PYENV_VERSIONS: "2.7 3.7 3.10"
1313
_PEX_PEXPECT_TIMEOUT: 10
1414
concurrency:
@@ -18,7 +18,7 @@ concurrency:
1818
jobs:
1919
org-check:
2020
name: Check GitHub Organization
21-
if: github.repository_owner == 'pantsbuild'
21+
if: github.repository_owner == 'pex-tool'
2222
runs-on: ubuntu-22.04
2323
steps:
2424
- name: Noop

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
org-check:
1313
name: Check GitHub Organization
14-
if: ${{ github.repository_owner == 'pantsbuild' }}
14+
if: ${{ github.repository_owner == 'pex-tool' }}
1515
runs-on: ubuntu-22.04
1616
steps:
1717
- name: Noop
@@ -125,7 +125,7 @@ jobs:
125125
"type": "section",
126126
"text": {
127127
"type": "mrkdwn",
128-
"text": "Pex ${{ needs.determine-tag.outputs.release-version }} is released:\n* https://pypi.org/project/pex/${{ needs.determine-tag.outputs.release-version }}/\n* https://github.com/pantsbuild/pex/releases/tag/${{ needs.determine-tag.outputs.release-tag }}"
128+
"text": "Pex ${{ needs.determine-tag.outputs.release-version }} is released:\n* https://pypi.org/project/pex/${{ needs.determine-tag.outputs.release-version }}/\n* https://github.com/pex-tool/pex/releases/tag/${{ needs.determine-tag.outputs.release-tag }}"
129129
}
130130
}
131131
]

CHANGES.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ contain those characters under PyPy3, Python 3.5 and Python 3.6.
12021202
This is another hotfix of the 2.1.48 release's `--layout` feature that
12031203
fixes identification of `--layout zipapp` PEXes that have had their
12041204
execute mode bit turned off. A notable example is the Pex PEX when
1205-
downloaded from <https://github.com/pantsbuild/pex/releases>.
1205+
downloaded from <https://github.com/pex-tool/pex/releases>.
12061206

12071207
* Fix zipapp layout identification. (#1448)
12081208

@@ -1712,7 +1712,7 @@ applications when specifying the `--unzip` option. PEXes built with
17121712
there already and then re-execute themselves from there. This can
17131713
improve startup latency. Pex itself now uses this mode in our [PEX
17141714
release](
1715-
https://github.com/pantsbuild/pex/releases/download/v2.1.8/pex).
1715+
https://github.com/pex-tool/pex/releases/download/v2.1.8/pex).
17161716

17171717
* Better support unzip mode PEXes. (#941)
17181718
* Support an unzip toggle for PEXes. (#939)
@@ -1731,7 +1731,7 @@ new support for control of the cache's runtime location with
17311731
control the cache's runtime location.
17321732

17331733
Unlike in the past, the [Pex PEX](
1734-
https://github.com/pantsbuild/pex/releases/download/v2.1.7/pex) we
1734+
https://github.com/pex-tool/pex/releases/download/v2.1.7/pex) we
17351735
release can now also be controlled via the `PEX_ROOT` environment
17361736
variable. Consult the CLI help for `--no-strip-pex-env`cto find out
17371737
more.
@@ -2448,7 +2448,7 @@ normalization.
24482448

24492449
* Add support for `.pexrc` files for influencing the pex environment.
24502450
See the notes [here](
2451-
https://github.com/pantsbuild/pex/blob/master/docs/buildingpex.rst#tailoring-pex-execution-at-build-time
2451+
https://github.com/pex-tool/pex/blob/master/docs/buildingpex.rst#tailoring-pex-execution-at-build-time
24522452
).
24532453
* Bug fix: PEX_PROFILE_FILENAME and PEX_PROFILE_SORT were not
24542454
respected.
@@ -2475,7 +2475,7 @@ normalization.
24752475
with default values that were not explicitly set in the environment.
24762476
Fixes #135.
24772477
* Bug fix: Since
2478-
[69649c1](https://github.com/pantsbuild/pex/commit/69649c1) we have
2478+
[69649c1](https://github.com/pex-tool/pex/commit/69649c1) we have
24792479
been un-patching the side effects of `sys.modules` after
24802480
`PEX.execute`. This takes all modules imported during the PEX
24812481
lifecycle and sets all their attributes to `None`. Unfortunately,
@@ -2622,7 +2622,7 @@ This is the last release before the 1.0.0 development branch is started.
26222622
[requests](https://github.com/kennethreitz/requests), improving both
26232623
performance and security. For more information, read the commit
26242624
notes at [91c7f32](
2625-
https://github.com/pantsbuild/pex/commit/91c7f324085c18af714d35947b603a5f60aeb682
2625+
https://github.com/pex-tool/pex/commit/91c7f324085c18af714d35947b603a5f60aeb682
26262626
).
26272627
* Improvements to API documentation throughout.
26282628
* Renamed `Tracer` to `TraceLogger` to prevent nondeterministic isort

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing
2+
3+
First, thank you in advance for your time and effort!
4+
5+
## Constraints
6+
7+
Pex provides the `pex`, `pex3` and `pex-tools` tools via the [`pex` distribution on PyPI](
8+
https://pypi.org/project/pex/) and the [`pex` PEX released on GitHub](
9+
https://github.com/pex-tool/pex/releases/latest). Although there is no public code API (Pex is
10+
supported as a CLI tool only), its stability guarantees for these scripts are paramount. Pex should
11+
strictly adhere to [SEMVER 2.0](https://semver.org/) and never bump the major version. In other
12+
words, changes should only fix bugs or add new features, never change existing features / the CLI
13+
API (option names, meanings, etc.). As part of this guaranty, Pex must maintain support for all the
14+
Pythons it has ever supported, namely CPython and PyPy for versions 2.7 and 3.5+. This means Pex
15+
contributions are limited to Python 2.7 syntax and type hints using the comment style.
16+
17+
These hard constraints aside, Pex stays abreast of the latest as best as possible in the Python
18+
packaging world. It always strives to support the latest Python and Pip releases either before they
19+
reach a stable release or within a few days of one. As such, coverage of both Python interpreters
20+
and Pip versions is broad in CI and most changes can proceed with confidence if CI goes green.
21+
22+
## Development Environment
23+
24+
You'll need just a few tools to hack on Pex:
25+
+ The [`tox`](https://tox.wiki) tool.
26+
+ (Optionally) Docker, or a Docker CLI clone like podman.
27+
28+
## Development Cycle
29+
30+
You might want to open a [discussion](https://github.com/pex-tool/pex/discussions) or [issue](
31+
https://github.com/pex-tool/pex/issues) to vet your idea first. It can often save overall effort and
32+
lead to a better end result.
33+
34+
Before sending off changes you should run `tox -e fmt,lint,check`. This formats, lints and type
35+
checks the code.
36+
37+
In addition you should run tests, which are divided into integration tests (those under
38+
`tests/integration/`) and unit tests (those under `tests/` but not under `tests/integration/`).
39+
Unit tests have a tox environment name that matches the desired interpreter to test against. So, to
40+
run unit tests against CPython 3.11 (which you must have installed), use `tox -e py311`. For
41+
CPython 2.7 use `tox -e py27` and for PyPy 3.10 `tox -e pypy310`, etc. Integration tests follow the
42+
same scheme with `-integration` appended to the environment name; so `tox -e py311-integration`,
43+
`tox -epy27-integration`, `tox -e pypy310-integration`, etc. Both sets of test environments support
44+
passing additional args to the test runner, which is a small shim around pytest. The shim supports
45+
a `--devpi` option to have tests use a local [devpi server](https://pypi.org/project/devpi-server/)
46+
caching proxy server. This generally helps with network flakes and is a friendly thing to do for
47+
the PyPI maintainers. For example, `tox -e py312 -- --devpi -k just_this_test` would run unit tests
48+
against CPython 3.12 using a devpi server and additionally just run the `just_this_test` test by
49+
using pytest's `-k` test selector option.
50+
51+
If you have `docker` installed, you can use `./dtox.sh` in place of `tox` for any of the commands
52+
described above. This will transparently pull or build a docker image on first execution that
53+
contains all the Pythons Pex supports; so you can run the now exotic `./dtox.sh -e pypy27...`
54+
without having to actually install PyPy 2.7 on your machine.
55+
56+
When you're ready to get additional eyes on your changes, submit a [pull request](
57+
https://github.com/pex-tool/pex/pulls).
58+

README.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
***
22
PEX
33
***
4-
.. image:: https://github.com/pantsbuild/pex/workflows/CI/badge.svg?branch=main
5-
:target: https://github.com/pantsbuild/pex/actions?query=branch%3Amain+workflow%3ACI
4+
.. image:: https://github.com/pex-tool/pex/workflows/CI/badge.svg?branch=main
5+
:target: https://github.com/pex-tool/pex/actions?query=branch%3Amain+workflow%3ACI
66
.. image:: https://img.shields.io/pypi/l/pex.svg
77
:target: https://pypi.org/project/pex/
88
.. image:: https://img.shields.io/pypi/v/pex.svg
@@ -167,13 +167,13 @@ running ``tox --listenvs-all``, then invoke like this:
167167

168168
.. code-block::
169169
170-
$ tox -e format-run
170+
$ tox -e fmt
171171
172172
To run MyPy:
173173

174174
.. code-block::
175175
176-
$ tox -e typecheck
176+
$ tox -e check
177177
178178
All of our tox test environments allow passthrough arguments, which can be helpful to run
179179
specific tests:
@@ -188,7 +188,3 @@ To run Pex from source, rather than through what is on your PATH, invoke via Pyt
188188
189189
$ python -m pex
190190
191-
Contributing
192-
============
193-
194-
To contribute, follow these instructions: https://www.pantsbuild.org/docs/contributor-overview

RELEASE.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ Version Bump and Changelog
3434
--------------------------
3535

3636
Bump the version in ``pex/version.py`` and update ``CHANGES.rst``. Open a PR with these changes and
37-
land it on https://github.com/pantsbuild/pex main.
37+
land it on https://github.com/pex-tool/pex main.
3838

3939
Release
4040
=======
4141

4242
Push Release tag to Master
4343
--------------------------
4444

45-
Sync a local branch with https://github.com/pantsbuild/pex main and confirm it has the version
45+
Sync a local branch with https://github.com/pex-tool/pex main and confirm it has the version
4646
bump and changelog update as the tip commit:
4747

4848
::
@@ -58,23 +58,23 @@ bump and changelog update as the tip commit:
5858
pex/version.py | 2 +-
5959
2 files changed, 18 insertions(+), 3 deletions(-)
6060

61-
Tag the release and push the tag to https://github.com/pantsbuild/pex main:
61+
Tag the release and push the tag to https://github.com/pex-tool/pex main:
6262

6363
::
6464

6565
$ git tag --sign -am 'Release 2.1.29' v2.1.29
66-
$ git push --tags https://github.com/pantsbuild/pex HEAD:main
66+
$ git push --tags https://github.com/pex-tool/pex HEAD:main
6767

6868
If you're on macOS and commit signing fails, try setting ``export GPG_TTY=$(tty)``.
6969

7070
Open the Release workflow run and wait for it to go green:
71-
https://github.com/pantsbuild/pex/actions?query=workflow%3ARelease+branch%3Av2.1.29
71+
https://github.com/pex-tool/pex/actions?query=workflow%3ARelease+branch%3Av2.1.29
7272

7373
Edit the Github Release Page
7474
----------------------------
7575

7676
Open the release page for edit:
77-
https://github.com/pantsbuild/pex/releases/edit/v2.1.29
77+
https://github.com/pex-tool/pex/releases/edit/v2.1.29
7878

7979
1. Copy and paste the most recent CHANGES.rst section.
8080
2. Adapt the syntax from RestructuredText to Markdown (e.g. remove RST links ```PR #... <...>`_``).

build-backend/pex_build/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2024 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2024 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).

build-backend/pex_build/hatchling/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2024 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
from __future__ import absolute_import

build-backend/pex_build/hatchling/dynamic_requires_python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2024 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
from __future__ import absolute_import, print_function

build-backend/pex_build/hatchling/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2024 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
from __future__ import absolute_import

docker/cache/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# A data image with the necessary binaries and libraries to develop pex.
22

33
# Populate the ~/.pex_dev cache.
4-
FROM ghcr.io/pantsbuild/pex/base:latest as cache
4+
FROM ghcr.io/pex-tool/pex/base:latest as cache
55

6-
ARG PEX_REPO=https://github.com/pantsbuild/pex
6+
ARG PEX_REPO=https://github.com/pex-tool/pex
77
ARG GIT_REF=HEAD
88

99
# These must be set as a comma-separated list of all tox envs to cache.

docker/user/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG BASE_IMAGE_TAG=latest
2-
FROM ghcr.io/pantsbuild/pex/base:${BASE_IMAGE_TAG}
2+
FROM ghcr.io/pex-tool/pex/base:${BASE_IMAGE_TAG}
33

44
# Prepare developer shim that can operate on local files and not mess up perms in the process.
55
ARG USER

docs/_ext/vars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2020 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
from docutils import nodes, statemachine

docs/recipes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ process title so you see both the Python being used to run your PEX and the PEX
6565
6666
$ ./my.pex --foo bar &
6767
$ ps -o command | grep pex
68-
/home/jsirois/.pyenv/versions/3.10.2/bin/python3.10 /home/jsirois/dev/pantsbuild/jsirois-pex/my.pex --foo bar
68+
/home/jsirois/.pyenv/versions/3.10.2/bin/python3.10 /home/jsirois/dev/pex-tool/pex/my.pex --foo bar
6969
7070
PEX app in a container
7171
----------------------

dtox.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ BASE_INPUT=(
1515
base_hash=$(cat "${BASE_INPUT[@]}" | git hash-object -t blob --stdin)
1616

1717
function base_image_id() {
18-
docker image ls -q "ghcr.io/pantsbuild/pex/base:${base_hash}"
18+
docker image ls -q "ghcr.io/pex-tool/pex/base:${base_hash}"
1919
}
2020

2121
if [[ "${BASE_MODE}" == "build" && -z "$(base_image_id)" ]]; then
2222
docker build \
23-
--tag ghcr.io/pantsbuild/pex/base:latest \
24-
--tag "ghcr.io/pantsbuild/pex/base:${base_hash}" \
23+
--tag ghcr.io/pex-tool/pex/base:latest \
24+
--tag "ghcr.io/pex-tool/pex/base:${base_hash}" \
2525
"${ROOT}/docker/base"
2626
elif [[ "${BASE_MODE}" == "pull" ]]; then
27-
docker pull "ghcr.io/pantsbuild/pex/base:${base_hash}"
27+
docker pull "ghcr.io/pex-tool/pex/base:${base_hash}"
2828
fi
2929

3030
USER_INPUT=(
@@ -35,7 +35,7 @@ USER_INPUT=(
3535
user_hash=$(cat "${USER_INPUT[@]}" | git hash-object -t blob --stdin)
3636

3737
function user_image_id() {
38-
docker image ls -q "pantsbuild/pex/user:${user_hash}"
38+
docker image ls -q "pex-tool/pex/user:${user_hash}"
3939
}
4040

4141
if [[ -z "$(user_image_id)" ]]; then
@@ -45,8 +45,8 @@ if [[ -z "$(user_image_id)" ]]; then
4545
--build-arg UID="$(id -u)" \
4646
--build-arg GROUP="$(id -gn)" \
4747
--build-arg GID="$(id -g)" \
48-
--tag pantsbuild/pex/user:latest \
49-
--tag "pantsbuild/pex/user:${user_hash}" \
48+
--tag pex-tool/pex/user:latest \
49+
--tag "pex-tool/pex/user:${user_hash}" \
5050
"${ROOT}/docker/user"
5151
fi
5252

@@ -60,13 +60,13 @@ if [[ "${CACHE_MODE}" == "pull" ]]; then
6060
docker run \
6161
--rm \
6262
--volume pex-caches:/development/pex_dev \
63-
"ghcr.io/pantsbuild/pex/cache:${CACHE_TAG}" || true
63+
"ghcr.io/pex-tool/pex/cache:${CACHE_TAG}" || true
6464
docker run \
6565
--rm \
6666
--volume pex-caches:/development/pex_dev \
6767
--entrypoint bash \
6868
--user root \
69-
"pantsbuild/pex/user:${user_hash}" \
69+
"pex-tool/pex/user:${user_hash}" \
7070
-c "chown -R $(id -u):$(id -g) /development/pex_dev"
7171
fi
7272

@@ -114,6 +114,6 @@ exec docker run \
114114
--volume "${ROOT}:/development/pex" \
115115
--volume pex-tox:/development/pex/.tox \
116116
"${DOCKER_ARGS[@]}" \
117-
"pantsbuild/pex/user:${user_hash}" \
117+
"pex-tool/pex/user:${user_hash}" \
118118
"$@"
119119

pex/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2014 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).

pex/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2019 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
from __future__ import absolute_import

pex/argparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2021 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
from __future__ import absolute_import

pex/asserts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
1+
# Copyright 2024 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
from __future__ import absolute_import
@@ -33,7 +33,7 @@
3333
Firstly, please accept our apology!
3434
3535
If you could file an issue with the error and details above, we'd be
36-
grateful. You can do that at https://github.com/pantsbuild/pex/issues/new and
36+
grateful. You can do that at https://github.com/pex-tool/pex/issues/new and
3737
redact or amend any details that expose sensitive information.
3838
"""
3939
).strip()

0 commit comments

Comments
 (0)