Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0 - Remove use of pkg_resources #80

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
python-version:
- "3.10"
- "3.11"
- "3.12"
system:
- ubuntu-latest
- macos-latest
Expand Down Expand Up @@ -55,7 +56,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 +69,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
14 changes: 9 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=c704961deeb1f544c94a11a7582f58d4
=====================================
-->

# 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 All @@ -31,6 +31,7 @@ This package is tested with the following Python minor versions:

* [`python3.10`](https://docs.python.org/3.10/)
* [`python3.11`](https://docs.python.org/3.11/)
* [`python3.12`](https://docs.python.org/3.12/)

## Platform Support

Expand Down Expand Up @@ -70,8 +71,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 +84,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
2 changes: 1 addition & 1 deletion local/configs/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author_info:
email: "vaughnkottler@gmail.com"
username: "vkottler"

versions: ["3.10", "3.11"]
versions: ["3.10", "3.11", "3.12"]

systems:
- macos-latest
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
3 changes: 2 additions & 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 All @@ -24,6 +24,7 @@ classifiers = [
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.2
# hash=b10cdc2e4759a797bc0d36b525de6ade
# version=3.1.3
# hash=43286ed57052c2548361d2dcdd062187
# =====================================

"""
Expand Down Expand Up @@ -30,6 +30,7 @@
"versions": [
"3.10",
"3.11",
"3.12",
],
}
setup(
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.

Loading