Skip to content

Commit ba78367

Browse files
authored
Merge pull request #118 from fossasia/development
chore: merge development branch with master branch
2 parents 9d27780 + 5c03e23 commit ba78367

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+9477
-7101
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ __PYCACHE__
55
build
66
_*
77
PSL.egg-info
8+
.idea/

.travis.yml

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
language: python
2+
23
python:
3-
- "2.6"
4-
- "2.7"
5-
- "3.2"
6-
- "3.3"
7-
- "3.4"
8-
# - "3.5"
9-
#- "3.5-dev" # 3.5 development branch
10-
#- "nightly" # currently points to 3.6-dev
11-
# command to install dependencies
12-
#install: "pip install -r requirements.txt"
13-
# command to run tests
14-
script: nosetests
4+
- "3.5"
5+
- "3.6"
6+
- "3.7"
7+
- "3.8"
8+
9+
before_install:
10+
- sudo apt-get -qq update
11+
- sudo mkdir -p /builds
12+
- sudo chmod a+rw /builds
1513

16-
notifications:
17-
slack: fossasia:bqOzo4C9y6oI6dTF8kO8zdxp
14+
install:
15+
- pip3 install flake8 -r requirements.txt
16+
- flake8 . --select=E9,F63,F7,F82 --show-source --statistics
17+
- sudo env "PATH=$PATH" make clean
18+
- make all
19+
- sudo env "PATH=$PATH" make install
20+
21+
script: nosetests

MANIFEST.in

-3
This file was deleted.

Makefile

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
DESTDIR =
2+
3+
# Find library installation path
4+
INSTALL_PATH = $(patsubst Location:,,$(shell python3 -m pip show PSL | grep Location))
5+
INSTALL_PATH_LEN = $(shell echo $(INSTALL_PATH) | wc -c)
6+
27
all:
3-
#make -C docs html
4-
#make -C docs/misc all
5-
# make in subdirectory PSLab-apps-master if it is there
6-
[ ! -d PSLab-apps-master ] || make -C PSLab-apps-master $@ DESTDIR=$(DESTDIR)
7-
python setup.py build
88
python3 setup.py build
99

10-
clean:
11-
rm -rf docs/_*
12-
# make in subdirectory PSLab-apps-master if it is there
13-
[ ! -d PSLab-apps-master ] || make -C PSLab-apps-master $@ DESTDIR=$(DESTDIR)
14-
rm -rf PSL.egg-info build
15-
find . -name "*~" -o -name "*.pyc" -o -name "__pycache__" | xargs rm -rf
10+
fullcleanup: verifyFiles
11+
# Removes every PSL instance in system. Be careful and check if the following list got all files inside a python folder or related to PSLab
12+
find /usr/* -name "PSL*" -type d | xargs rm -rf
13+
find /usr/* -name "pslab*" -type d | xargs rm -rf
14+
find /opt/* -name "pslab-*" -type d | xargs rm -rf
15+
find /usr/* -name "Experiments" -type f | xargs rm -rf
16+
@echo "All selected files are deleted.."
1617

17-
IMAGEDIR=$(DESTDIR)/usr/share/doc/pslab-common/images
18+
verifyFiles:
19+
@find /usr/* -name "PSL*" -type d
20+
@find /usr/* -name "pslab*" -type d
21+
@find /opt/* -name "pslab-*" -type d
22+
@find /usr/* -name "Experiments" -type f
23+
@echo -n "Confirm if you want to remove all these files.. [Y/N] " && read ans && [ $${ans:-N} = Y ]
24+
25+
clean:
26+
# Remove build files
27+
@rm -rf docs/_*
28+
@rm -rf PSL.egg-info build
29+
@find . -name "*~" -o -name "*.pyc" -o -name "__pycache__" | xargs rm -rf
30+
if [ ${INSTALL_PATH_LEN} -gt 2 ]; then sudo rm -rf $(INSTALL_PATH)/PSL $(INSTALL_PATH)/PSL-1* ; fi
1831

1932
install:
20-
# make in subdirectory PSLab-apps-master if it is there
21-
[ ! -d PSLab-apps-master ] || make -C PSLab-apps-master $@ DESTDIR=$(DESTDIR)
22-
# install documents
23-
install -d $(DESTDIR)/usr/share/doc/pslab
24-
#cp -a docs/_build/html $(DESTDIR)/usr/share/doc/pslab
25-
#cp docs/misc/build/*.html $(DESTDIR)/usr/share/doc/pslab/html
26-
# create ditributions for Python2 and Python3
27-
python setup.py install --install-layout=deb \
28-
--root=$(DESTDIR)/ --prefix=/usr
29-
python3 setup.py install --install-layout=deb \
30-
--root=$(DESTDIR)/ --prefix=/usr
31-
# rules for udev
33+
python3 setup.py install
3234
mkdir -p $(DESTDIR)/lib/udev/rules.d
3335
install -m 644 99-pslab.rules $(DESTDIR)/lib/udev/rules.d/99-pslab
34-
# fix a few permissions
35-
#find $(DESTDIR)/usr/share/pslab/psl_res -name auto.sh -exec chmod -x {} \;

0 commit comments

Comments
 (0)