Skip to content

Commit

Permalink
Remove USER_MODE option in the Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
KmolYuan committed Aug 30, 2019
1 parent c804634 commit 8f3974a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ before_install:
fi

script:
- make USER_MODE=false
- make

before_cache:
- rm -rf $HOME/.cache/pip/log
Expand Down
20 changes: 2 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# email: [email protected]

LAUNCHSCRIPT = launch_pyslvs
USER_MODE ?= true
PYSLVS_PATH = depend/pyslvs
PYTHON_SLVS_PATH = depend/solvespace/cython

Expand Down Expand Up @@ -44,11 +43,6 @@ all: test
help:
@echo Pyslvs Makefile Help
@echo
@echo parameters:
@echo - USER_MODE: install submodule as --user option if not false,
@echo set it as USER_MODE=false to disable it.
@echo default has no sudo required.
@echo
@echo make target:
@echo - help: show this help message.
@echo - all: build Pyslvs and test binary.
Expand All @@ -66,23 +60,13 @@ help:
build-pyslvs:
@echo ---Pyslvs libraries Build---
-$(PY) -m pip uninstall pyslvs -y
$(eval CMD = cd $(PYSLVS_PATH) && $(PY) setup.py install)
ifneq ($(USER_MODE),false)
$(CMD) --user
else
$(CMD)
endif
cd $(PYSLVS_PATH) && $(PY) setup.py install
@echo ---Done---

build-solvespace:
@echo ---Python Solvespace Build---
-$(PY) -m pip uninstall python_solvespace -y
$(eval CMD = cd $(PYTHON_SLVS_PATH) && $(PY) setup.py install)
ifneq ($(USER_MODE),false)
$(CMD) --user
else
$(CMD)
endif
cd $(PYTHON_SLVS_PATH) && $(PY) setup.py install
@echo ---Done---

build-kernel: build-pyslvs build-solvespace
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
+ Settings correction of AppVeyor.
+ Reformat the actions for all of context menus.
+ Use pyenv instead of MacPorts in Travis CI.
+ Remove USER_MODE option in the Makefile.

## Version 19.07

Expand Down
4 changes: 3 additions & 1 deletion docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ pip install -r requirements.txt

**Mac OS and Ubuntu**:

Using [pyenv](https://github.com/pyenv/pyenv) will be more easier to handle Python version instead of using system Python.
It is recommended to use [pyenv](https://github.com/pyenv/pyenv),
which will be more easier to handle Python version instead of using system Python.
So any operation about Python will not required `sudo` or `--user` option.

```bash
# Install supported version of Pyslvs
Expand Down
4 changes: 0 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ git submodule update --init --recursive

# Compile and install submodules
make build-kernel
# Install submodules without --user option
make build-kernel USER_MODE=false

# Open GUI by Python
python launch_pyslvs.py
Expand All @@ -54,8 +52,6 @@ python launch_pyslvs.py --help

# Pack into stand-alone executable file
make
# Without --user option
make USER_MODE=false
```

Python libraries has some dependencies with the compile environment,
Expand Down

0 comments on commit 8f3974a

Please sign in to comment.