modules: rename to vendor

This is a lot more tab-complete-friendly and it's also closer to what
many other packages do for similar situations.
This commit is contained in:
Allison Karlitskaya 2023-09-06 10:47:25 +02:00 committed by Martin Pitt
parent aba03dcae4
commit eab0640513
13 changed files with 19 additions and 19 deletions

View File

@ -20,7 +20,7 @@ jobs:
run: git config --global --add safe.directory /__w/cockpit/cockpit
- name: Install submodules
run: modules/checkout
run: vendor/checkout
- name: Check --help
run: PYTHONPATH=src python3 -m cockpit.bridge --help

View File

@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v3
- name: Checkout submodules
run: modules/checkout
run: vendor/checkout
- name: Run venv tests
run: runuser -u tox -- tox --colored=yes -m venv -- --color=yes

6
.gitmodules vendored
View File

@ -1,5 +1,5 @@
[submodule "modules/systemd_ctypes"]
path = modules/systemd_ctypes
path = vendor/systemd_ctypes
url = https://github.com/allisonkarlitskaya/systemd_ctypes.git
[submodule "node_modules"]
path = node_modules
@ -9,9 +9,9 @@
url = https://github.com/cockpit-project/pixel-test-reference
branch = empty
[submodule "modules/ferny"]
path = modules/ferny
path = vendor/ferny
url = https://github.com/allisonkarlitskaya/ferny
[submodule "modules/beipack"]
path = modules/beipack
path = vendor/beipack
url = https://github.com/allisonkarlitskaya/beipack
branch = main

View File

@ -71,7 +71,7 @@ class SourceDirectory(PodmanTemporaryDirectory):
else:
opts = []
git('clone', '--recurse-submodule=modules/*', *opts, '.', self.name)
git('clone', '--recurse-submodule=vendor/*', *opts, '.', self.name)
if not args.head and not args.branch:
if stash := git_output('stash', 'create'):

View File

@ -1,9 +0,0 @@
#!/bin/sh
set -eu
cd "${0%/*}/.."
# Nothing missing? Do nothing.
git submodule status modules | grep -q ^- || exit 0
git submodule update --init --checkout 'modules/*'

View File

@ -18,7 +18,7 @@ TAG = 'py3-none-any'
def find_sources(*, srcpkg: bool) -> Iterable[str]:
try:
subprocess.check_call(['modules/checkout'], stdout=2) # Needed for git builds...
subprocess.check_call(['vendor/checkout'], stdout=2) # Needed for git builds...
except FileNotFoundError: # ...but not present in tarball...
pass # ...and not needed either, because...
assert os.path.exists('src/cockpit/_vendor/ferny/__init__.py') # ...the code should exist there already.

View File

@ -1 +1 @@
../../../modules/beipack/src/bei
../../../vendor/beipack/src/bei

View File

@ -1 +1 @@
../../../modules/ferny/src/ferny
../../../vendor/ferny/src/ferny

View File

@ -1 +1 @@
../../../modules/systemd_ctypes/src/systemd_ctypes
../../../vendor/systemd_ctypes/src/systemd_ctypes

View File

9
vendor/checkout vendored Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
set -eu
cd "${0%/*}/.."
# Nothing missing? Do nothing.
git submodule status vendor | grep -q ^- || exit 0
git submodule update --init --checkout 'vendor/*'

View File