Skip to content
This repository was archived by the owner on Aug 31, 2025. It is now read-only.

Commit f1015b4

Browse files
committed
chore: improve development environment and build configuration
- Add clean .envrc for direnv support with uv layout and project settings - Update .gitignore to exclude .direnv/ and tags files - Clean up duplicate create-release target in Makefile - Fix deprecated pyo3_build_config import in build.rs These changes enhance the development workflow by standardizing the environment setup and resolving build configuration issues.
1 parent 99532da commit f1015b4

File tree

4 files changed

+44
-17
lines changed

4 files changed

+44
-17
lines changed

.envrc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# vim: set foldmethod=marker foldmarker={{{,}}}:
2+
#!/usr/bin/env bash
3+
# shellcheck disable=SC1091
4+
source "$TW_BINX/lib/sane_fn.sh"
5+
PROJ_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
export PROJ_DIR
7+
8+
############### Python ###############
9+
# Emulate the pipenvs's activate, because we can't source things in direnv
10+
layout_uv
11+
export PYTHONPATH=$PROJ_DIR
12+
export PIPENV_VENV_IN_PROJECT=1 # creates .venv
13+
14+
if which tmux > /dev/null 2>&1; then
15+
tmux rename-window "$(basename "$PROJ_DIR")"
16+
fi
17+
18+
############### Exports ###############
19+
export RUN_ENV=local
20+
export senv="source $PROJ_DIR/scripts/env.sh"
21+
22+
############### Java ###############
23+
24+
############### BMW ###############
25+
26+
export RPLC_CONFIG="$VIMWIKI_PATH/dev/vimania-uri-rs.md"
27+
export RPLC_MIRROR_DIR="$HOME/dev/s/private/py-twlib/rplc/sysid/vimania-uri-rs"
28+
swapin() {
29+
rplc -v swapin
30+
direnv allow
31+
}
32+
export_function swapin
33+
swapout() {
34+
rplc -v swapout
35+
direnv allow
36+
}
37+
export_function swapout
38+
39+
PATH_add $PROJ_DIR/scripts
40+
export RPLC_SWAPPED=1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.direnv/
2+
tags
13
doc/~*
24
.idea/runConfigurations/_template__of_py_test*
35
pythonx/*

Makefile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ tests_src = $(app_root)/tests
1818
# Makefile directory
1919
CODE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
2020

21-
.PHONY: all
22-
all: clean build upload tag ## Build and upload
23-
@echo "--------------------------------------------------------------------------------"
24-
@echo "-M- building and distributing"
25-
@echo "--------------------------------------------------------------------------------"
26-
2721
################################################################################
2822
# Developing \
2923
DEVELOPING: ## ###############################################################
@@ -148,15 +142,6 @@ create-release: check-github-token ## create a release on GitHub via the gh cli
148142
gh release create "v$(VERSION)" --generate-notes --latest; \
149143
fi
150144

151-
.PHONY: create-release
152-
create-release: ## create a release on GitHub via the gh cli
153-
@if command -v gh version &>/dev/null; then \
154-
echo "Creating GitHub release for v$(VERSION)"; \
155-
gh release create "v$(VERSION)" --generate-notes; \
156-
else \
157-
echo "You do not have the github-cli installed. Please create release from the repo manually."; \
158-
exit 1; \
159-
fi
160145

161146
.PHONY: check-github-token
162147
check-github-token: ## Check if GITHUB_TOKEN is set

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use pyo3_build_config;
1+
use pyo3_build_config::add_extension_module_link_args;
22

33
fn main() {
4-
pyo3_build_config::add_extension_module_link_args();
4+
add_extension_module_link_args();
55
}

0 commit comments

Comments
 (0)