Skip to content

Commit

Permalink
Merge pull request #118 from fossasia/development
Browse files Browse the repository at this point in the history
chore: merge development branch with master branch
  • Loading branch information
CloudyPadmal authored Jun 8, 2020
2 parents 9d27780 + 5c03e23 commit ba78367
Show file tree
Hide file tree
Showing 41 changed files with 9,477 additions and 7,101 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ __PYCACHE__
build
_*
PSL.egg-info
.idea/
32 changes: 18 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
language: python

python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
# - "3.5"
#- "3.5-dev" # 3.5 development branch
#- "nightly" # currently points to 3.6-dev
# command to install dependencies
#install: "pip install -r requirements.txt"
# command to run tests
script: nosetests
- "3.5"
- "3.6"
- "3.7"
- "3.8"

before_install:
- sudo apt-get -qq update
- sudo mkdir -p /builds
- sudo chmod a+rw /builds

notifications:
slack: fossasia:bqOzo4C9y6oI6dTF8kO8zdxp
install:
- pip3 install flake8 -r requirements.txt
- flake8 . --select=E9,F63,F7,F82 --show-source --statistics
- sudo env "PATH=$PATH" make clean
- make all
- sudo env "PATH=$PATH" make install

script: nosetests
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

52 changes: 26 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
DESTDIR =

# Find library installation path
INSTALL_PATH = $(patsubst Location:,,$(shell python3 -m pip show PSL | grep Location))
INSTALL_PATH_LEN = $(shell echo $(INSTALL_PATH) | wc -c)

all:
#make -C docs html
#make -C docs/misc all
# make in subdirectory PSLab-apps-master if it is there
[ ! -d PSLab-apps-master ] || make -C PSLab-apps-master $@ DESTDIR=$(DESTDIR)
python setup.py build
python3 setup.py build

clean:
rm -rf docs/_*
# make in subdirectory PSLab-apps-master if it is there
[ ! -d PSLab-apps-master ] || make -C PSLab-apps-master $@ DESTDIR=$(DESTDIR)
rm -rf PSL.egg-info build
find . -name "*~" -o -name "*.pyc" -o -name "__pycache__" | xargs rm -rf
fullcleanup: verifyFiles
# 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
find /usr/* -name "PSL*" -type d | xargs rm -rf
find /usr/* -name "pslab*" -type d | xargs rm -rf
find /opt/* -name "pslab-*" -type d | xargs rm -rf
find /usr/* -name "Experiments" -type f | xargs rm -rf
@echo "All selected files are deleted.."

IMAGEDIR=$(DESTDIR)/usr/share/doc/pslab-common/images
verifyFiles:
@find /usr/* -name "PSL*" -type d
@find /usr/* -name "pslab*" -type d
@find /opt/* -name "pslab-*" -type d
@find /usr/* -name "Experiments" -type f
@echo -n "Confirm if you want to remove all these files.. [Y/N] " && read ans && [ $${ans:-N} = Y ]

clean:
# Remove build files
@rm -rf docs/_*
@rm -rf PSL.egg-info build
@find . -name "*~" -o -name "*.pyc" -o -name "__pycache__" | xargs rm -rf
if [ ${INSTALL_PATH_LEN} -gt 2 ]; then sudo rm -rf $(INSTALL_PATH)/PSL $(INSTALL_PATH)/PSL-1* ; fi

install:
# make in subdirectory PSLab-apps-master if it is there
[ ! -d PSLab-apps-master ] || make -C PSLab-apps-master $@ DESTDIR=$(DESTDIR)
# install documents
install -d $(DESTDIR)/usr/share/doc/pslab
#cp -a docs/_build/html $(DESTDIR)/usr/share/doc/pslab
#cp docs/misc/build/*.html $(DESTDIR)/usr/share/doc/pslab/html
# create ditributions for Python2 and Python3
python setup.py install --install-layout=deb \
--root=$(DESTDIR)/ --prefix=/usr
python3 setup.py install --install-layout=deb \
--root=$(DESTDIR)/ --prefix=/usr
# rules for udev
python3 setup.py install
mkdir -p $(DESTDIR)/lib/udev/rules.d
install -m 644 99-pslab.rules $(DESTDIR)/lib/udev/rules.d/99-pslab
# fix a few permissions
#find $(DESTDIR)/usr/share/pslab/psl_res -name auto.sh -exec chmod -x {} \;
Loading

0 comments on commit ba78367

Please sign in to comment.