Skip to content

Commit

Permalink
modules: rename to vendor
Browse files Browse the repository at this point in the history
This is a lot more tab-complete-friendly and it's also closer to what
many other packages do for similar situations.
  • Loading branch information
allisonkarlitskaya authored and martinpitt committed Sep 7, 2023
1 parent aba03dc commit eab0640
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pybridge-c8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion containers/unit-tests/start
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down
9 changes: 0 additions & 9 deletions modules/checkout

This file was deleted.

2 changes: 1 addition & 1 deletion src/build_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

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.
Expand Down
2 changes: 1 addition & 1 deletion src/cockpit/_vendor/bei
2 changes: 1 addition & 1 deletion src/cockpit/_vendor/ferny
2 changes: 1 addition & 1 deletion src/cockpit/_vendor/systemd_ctypes
9 changes: 9 additions & 0 deletions vendor/checkout
Original file line number Diff line number Diff line change
@@ -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/*'

0 comments on commit eab0640

Please sign in to comment.