Skip to content

Commit 19423ed

Browse files
committed
Remove stagpy-git link
Leaking a link in users' home directory is uncalled for: activating the virtual environment is cleaner, more robust, and provides access to the Python library as well.
1 parent 4e670a8 commit 19423ed

File tree

3 files changed

+12
-27
lines changed

3 files changed

+12
-27
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
*.pdf
22
*.swp
3-
*/__pycache__/
3+
__pycache__/
44
.coverage
55
.tox
66
stagpy.egg-info/
7-
.venv_dev/
7+
/stagpy_git/
88
docs/_build/
99
docs/_static/
1010
docs/_templates/

Makefile

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
LINK_DIR=~/bin
2-
LINK_NAME=stagpy-git
3-
LINK=$(LINK_DIR)/$(LINK_NAME)
4-
51
PY=python3
62

7-
VENV_DIR=.venv_dev
3+
VENV_DIR=stagpy_git
84
STAGPY=$(VENV_DIR)/bin/stagpy
95
VPY=$(VENV_DIR)/bin/python
106
VPIP=$(VPY) -m pip
@@ -16,17 +12,9 @@ VERSION=$(shell git describe --exact-match HEAD 2>/dev/null)
1612
.PHONY: info infopath infozsh infobash
1713
.PHONY: notebook-kernel
1814

19-
all: install
20-
21-
install: $(LINK) info
22-
@echo
23-
@echo 'Installation completed!'
15+
all: $(STAGPY) info
2416

25-
$(LINK): $(STAGPY)
26-
@mkdir -p $(LINK_DIR)
27-
ln -sf $(PWD)/$(STAGPY) $(LINK)
28-
29-
$(STAGPY): setup.py
17+
$(STAGPY): setup.py pyproject.toml
3018
$(PY) -m venv $(VENV_DIR)
3119
$(VPIP) install -U pip
3220
$(VPIP) install -e .
@@ -36,11 +24,13 @@ notebook-kernel: $(STAGPY)
3624
$(VPIP) install -U ipykernel
3725
$(VPY) -m ipykernel install --user --name=stagpy-git
3826

39-
info: infopath infozsh infobash
27+
info: infozsh infobash infoenv
4028

41-
infopath:
29+
infoenv:
4230
@echo
43-
@echo 'Add $(LINK_DIR) to your path to be able to call StagPy from anywhere'
31+
@echo 'Run'
32+
@echo ' source $(VENV_DIR)/bin/activate'
33+
@echo 'to use the development version of StagPy'
4434

4535
infozsh:
4636
@echo
@@ -54,14 +44,10 @@ infobash:
5444
@echo ' source ~/.config/stagpy/bash/stagpy.sh'
5545
@echo 'to your ~/.bashrc to enjoy command line completion with bash!'
5646

57-
clean: uninstall
47+
clean:
5848
-rm -rf $(VENV_DIR)
5949
-rm -rf stagpy.egg-info
6050

61-
uninstall:
62-
-rm -rf ~/.config/stagpy/
63-
-rm -f $(LINK)
64-
6551
again: clean all
6652

6753
release:

stagpy/args.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def parse_args(arglist=None):
5353
"""
5454
climan = CLIManager(conf, **SUB_CMDS)
5555

56-
create_complete_files(climan, CONFIG_DIR, 'stagpy', 'stagpy-git',
57-
zsh_sourceable=True)
56+
create_complete_files(climan, CONFIG_DIR, 'stagpy', zsh_sourceable=True)
5857

5958
cmd_args, all_subs = climan.parse_args(arglist)
6059
sub_cmd = cmd_args.loam_sub_name

0 commit comments

Comments
 (0)