Skip to content

Commit 3b622da

Browse files
committed
Move python code to py/
1 parent 51ad199 commit 3b622da

File tree

165 files changed

+17
-16
lines changed

Some content is hidden

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

165 files changed

+17
-16
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ Cargo.lock
3232
target
3333
janitor/_worker.*.so
3434
.testrepository
35+
py/janitor/config_pb2.py
36+
py/janitor/_worker.*.so

Makefile

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DOCKER_TAG ?= latest
22
PYTHON ?= python3
33

4-
core: janitor/site/_static/pygments.css build-inplace
4+
core: py/janitor/site/_static/pygments.css build-inplace
55

66
build-inplace:
77
$(PYTHON) setup.py build_ext -i
@@ -20,7 +20,7 @@ check:: style
2020
check:: ruff
2121

2222
ruff:
23-
ruff check .
23+
ruff check py tests
2424

2525
fix:: ruff-fix
2626

@@ -35,8 +35,10 @@ ruff-fix:
3535
suite-references:
3636
git grep "\\(lintian-brush\|lintian-fixes\|debianize\|fresh-releases\|fresh-snapshots\\)" | grep -v .example
3737

38-
test: build-inplace
39-
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python $(PYTHON) -m pytest tests
38+
test:: build-inplace
39+
PYTHONPATH=$(shell pwd)/py PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python $(PYTHON) -m pytest tests
40+
41+
test::
4042
cargo test
4143

4244
style:: yamllint
@@ -50,9 +52,9 @@ djlint:
5052
djlint -i J018,H030,H031,H021 --profile jinja janitor/site/templates
5153

5254
typing:
53-
$(PYTHON) -m mypy janitor tests
55+
$(PYTHON) -m mypy py/janitor tests
5456

55-
janitor/site/_static/pygments.css:
57+
py/janitor/site/_static/pygments.css:
5658
pygmentize -S default -f html > $@
5759

5860
clean:
@@ -69,4 +71,4 @@ docker-all: docker-site docker-runner docker-publish docker-archive docker-worke
6971
reformat:: reformat-html
7072

7173
reformat-html:
72-
djlint --reformat --format-css janitor/site/templates/
74+
djlint --reformat --format-css py/janitor/site/templates/

build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77

88
protobuf_codegen::Codegen::new()
99
.cargo_out_dir("generated")
10-
.inputs([top_dir.join("janitor/config.proto")])
10+
.inputs([top_dir.join("py/janitor/config.proto")])
1111
.include(top_dir)
1212
.run_from_script();
1313
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

janitor/logs.py py/janitor/logs.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

janitor/vcs.py py/janitor/vcs.py

File renamed without changes.
File renamed without changes.
File renamed without changes.

pyproject.toml

+5-8
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,12 @@ script-files = [
158158
"create-sbuild-chroot-schroot.py",
159159
"create-sbuild-chroot-unshare.py",
160160
]
161-
packages = [
162-
"janitor",
163-
"janitor.debian",
164-
"janitor.generic",
165-
"janitor.site",
166-
"janitor.site.cupboard",
167-
]
168161
include-package-data = false
169162

163+
[tool.setuptools.packages.find]
164+
where = ["py"]
165+
include = ["janitor*"]
166+
170167
[tool.setuptools.package-data]
171168
"*" = ["py.typed"]
172169
"janitor.site" = [
@@ -239,5 +236,5 @@ ignore-words = ".codespell-ignore-words"
239236
[tool.setuptools-protobuf]
240237
mypy = true
241238
protobufs = [
242-
"janitor/config.proto"
239+
"py/janitor/config.proto"
243240
]

0 commit comments

Comments
 (0)