Skip to content

Commit

Permalink
2.0.0 - Remove use of pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
vkottler committed Oct 5, 2023
1 parent 9b5b956 commit 086d135
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 64 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
env:
PY_TEST_EXTRA_ARGS: --cov-report=xml

- uses: codecov/codecov-action@main
- uses: codecov/codecov-action@v3

- run: mk pypi-upload-ci
env:
Expand All @@ -68,7 +68,7 @@ jobs:
- run: |
mk python-release owner=vkottler \
repo=vmklib version=1.10.6
repo=vmklib version=2.0.0
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!--
=====================================
generator=datazen
version=3.1.2
hash=da4d4c6d28f923c7af8cddbc7ef94455
version=3.1.3
hash=598c034e692603540425830661a95aa1
=====================================
-->

# vmklib ([1.10.6](https://pypi.org/project/vmklib/))
# vmklib ([2.0.0](https://pypi.org/project/vmklib/))

[![python](https://img.shields.io/pypi/pyversions/vmklib.svg)](https://pypi.org/project/vmklib/)
![Build Status](https://github.com/vkottler/vmklib/workflows/Python%20Package/badge.svg)
Expand Down Expand Up @@ -70,8 +70,8 @@ else with simple package updates.
```
$ ./venv3.11/bin/mk -h
usage: mk [-h] [--version] [-v] [-C DIR] [-p PREFIX] [-d] [-D DEFAULT]
[-f FILE] [-c CONFIG] [-P PROJ]
usage: mk [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]
[-p PREFIX] [-d] [-D DEFAULT] [-f FILE] [-c CONFIG] [-P PROJ]
[targets ...]
Simplify project workflows by standardizing use of GNU Make.
Expand All @@ -83,6 +83,9 @@ options:
-h, --help show this help message and exit
--version show program's version number and exit
-v, --verbose set to increase logging verbosity
-q, --quiet set to reduce output
--curses whether or not to use curses.wrapper when starting
--no-uvloop whether or not to disable uvloop as event loop driver
-C DIR, --dir DIR execute from a specific directory
-p PREFIX, --prefix PREFIX
a prefix to apply to all targets
Expand Down
6 changes: 3 additions & 3 deletions local/variables/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
major: 1
minor: 10
patch: 6
major: 2
minor: 0
patch: 0
entry: mk
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__"

[project]
name = "vmklib"
version = "1.10.6"
version = "2.0.0"
description = "Simplify project workflows by standardizing use of GNU Make."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# =====================================
# generator=datazen
# version=3.1.2
# version=3.1.3
# hash=b10cdc2e4759a797bc0d36b525de6ade
# =====================================

Expand Down
2 changes: 1 addition & 1 deletion tasks/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# =====================================
# generator=datazen
# version=3.1.2
# version=3.1.3
# hash=9f62028523c3b5a953733ca89dcc3018
# =====================================
"""
Expand Down
6 changes: 3 additions & 3 deletions vmklib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.2
# hash=08161d666b1ba6755b8b52d5679ad51c
# version=3.1.3
# hash=323a37ac953da26ff2b3ae5654e60ac6
# =====================================

"""
Expand All @@ -10,4 +10,4 @@

DESCRIPTION = "Simplify project workflows by standardizing use of GNU Make."
PKG_NAME = "vmklib"
VERSION = "1.10.6"
VERSION = "2.0.0"
2 changes: 1 addition & 1 deletion vmklib/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# =====================================
# generator=datazen
# version=3.1.2
# version=3.1.3
# hash=e3b25ef71e1382c4879938c082dd3893
# =====================================
"""
Expand Down
14 changes: 6 additions & 8 deletions vmklib/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
# third-party
from vcorelib.dict import GenericStrDict
from vcorelib.io import ARBITER
from vcorelib.paths import find_file
from vcorelib.target import Substitutions
from vcorelib.task import TaskFailed
from vcorelib.task.manager import TaskManager

# internal
from vmklib import PKG_NAME
from vmklib.resources import get_resource

LOG = logging.getLogger(__name__)
DEFAULT_FILE = Path("Makefile")
Expand Down Expand Up @@ -65,7 +65,7 @@ def build_makefile(
# get the path to this package's data to include our "conf.mk"
include_strs = [
"-include $($(PROJ)_MK_DIR)/init.mk",
f"include {get_resource('conf.mk')}",
f"include {find_file('conf.mk', package=PKG_NAME)}",
"-include $($(PROJ)_MK_DIR)/conf.mk",
]

Expand Down Expand Up @@ -106,12 +106,10 @@ def initialize_task_manager(
"""Load internal and external tasks to the task manager."""

# register task-manager targets from this package
conf = find_file("lib_tasks", "conf.py", package=PKG_NAME)
assert conf is not None
assert manager.script(
get_resource(os.path.join("lib_tasks", "conf.py")),
"register",
proj,
directory,
substitutions,
conf, "register", proj, directory, substitutions
), "Couldn't register package tasks from '{get_resource(task_register)}'!"

# register task-manager targets for the project
Expand Down Expand Up @@ -167,7 +165,7 @@ def entry(args: argparse.Namespace) -> int:
if args.file.name != str(DEFAULT_FILE):
LOG.error("'%s' not found", args.file)
return 1
args.file = get_resource(os.path.join("data", "header.mk"))
args.file = find_file("data", "header.mk", package=PKG_NAME)

# Add the default target early if nothing was specified.
if not args.targets and args.default:
Expand Down
2 changes: 1 addition & 1 deletion vmklib/data/data/header.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# =====================================
# generator=datazen
# version=3.1.2
# version=3.1.3
# hash=22a8a762623587d443724e0f1a2a9ee4
# =====================================
###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion vmklib/entry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# =====================================
# generator=datazen
# version=3.1.2
# version=3.1.3
# hash=745689313e0947f30ccf35892bb72cd4
# =====================================

Expand Down
36 changes: 0 additions & 36 deletions vmklib/resources.py

This file was deleted.

0 comments on commit 086d135

Please sign in to comment.