Skip to content

Commit

Permalink
configure scripts and build system
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Jul 31, 2024
1 parent 8f4e728 commit cc96863
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.py[co]
*.sw[po]
.DS_Store
.pytest_cache
.python-version
build
dist/
obs_common.egg-info/
venv/
3 changes: 3 additions & 0 deletions obs_common/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 changes: 4 additions & 3 deletions obs_common/license-check.py → obs_common/license_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,16 @@ def has_license_header(path: pathlib.Path):
return False


def main(args):
def main():
parser = argparse.ArgumentParser(description=DESCRIPTION)
parser.add_argument(
"-l", "--file-only", action="store_true", help="print files only"
)
parser.add_argument("--verbose", action="store_true", help="verbose output")
parser.add_argument("target", help="file or directory tree to check", nargs="?")

parsed = parser.parse_args(args)
parsed = parser.parse_args()
#parsed = parser.parse_args(args)

if parsed.target:
target = pathlib.Path(parsed.target)
Expand Down Expand Up @@ -149,4 +150,4 @@ def main(args):


if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
sys.exit(main())
File renamed without changes.
17 changes: 16 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
[project]
name = "obs-common"
version = "v2024.07.29"
description = "code shared between obs-team repositories"
dynamic = ["version"]

[project.scripts]
license-check = "obs_common.license_check:main"
service-status = "obs_common.service_status:main"

[build-system]
requires = ["setuptools", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.distutils.bdist_wheel]
universal = true

[tool.setuptools_scm]
# Empty is fine


[tool.ruff]
Expand Down

0 comments on commit cc96863

Please sign in to comment.