Skip to content

Commit

Permalink
Merge pull request #22 from MicheleTobias/qgis3
Browse files Browse the repository at this point in the history
port to QGIS 3
  • Loading branch information
MicheleTobias authored Nov 15, 2018
2 parents 8a10e5e + 290a9c5 commit 92546a9
Show file tree
Hide file tree
Showing 107 changed files with 300 additions and 24,326 deletions.
48 changes: 35 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#
# Add spatial locations to the citations in your Zotero database.
# -------------------
# begin : 2015-06-06
# begin : 2018-11-15
# git sha : $Format:%H$
# copyright : (C) 2015 by Michele Tobias & Alex Mandel
# copyright : (C) 2018 by Michele Tobias & Alex Mandel
# email : mmtobias@ucdavis.edu
# ***************************************************************************/
#
Expand All @@ -24,7 +24,16 @@


#Add iso code for any locales you want to support here (space separated)
LOCALES = af
# default is no locales
# LOCALES = af
LOCALES =

# If locales are enabled, set the name of the lrelease binary on your system. If
# you have trouble compiling the translations, you may have to specify the full path to
# lrelease
#LRELEASE = lrelease
#LRELEASE = lrelease-qt4


# translation
SOURCES = \
Expand All @@ -39,10 +48,15 @@ PY_FILES = \
literature_mapper_dialog.py \
__init__.py

UI_FILES = literature_mapper_dialog_base.ui table_interface.ui

EXTRAS = icon.png metadata.txt

EXTRA_DIRS =

COMPILED_RESOURCE_FILES = resources_rc.py

PEP8EXCLUDE=pydev,resources.py,conf.py,third_party,ui

#################################################
# Normally you would not need to edit below here
Expand All @@ -52,17 +66,19 @@ HELP = help/build/html

PLUGIN_UPLOAD = $(c)/plugin_upload.py

QGISDIR=.qgis2
RESOURCE_SRC=$(shell grep '^ *<file' resources.qrc | sed 's@</file>@@g;s/.*>//g' | tr '\n' ' ')

QGISDIR=.qgis3

default: compile

compile: $(COMPILED_RESOURCE_FILES)

%_rc.py : %.qrc
pyrcc4 -o $*_rc.py $<
%.py : %.qrc $(RESOURCES_SRC)
pyrcc5 -o $*.py $<

%.qm : %.ts
lrelease $<
$(LRELEASE) $<

test: compile transcompile
@echo
Expand All @@ -85,28 +101,31 @@ test: compile transcompile
deploy: compile doc transcompile
@echo
@echo "------------------------------------------"
@echo "Deploying plugin to your .qgis2 directory."
@echo "Deploying plugin to your .qgis3 directory."
@echo "------------------------------------------"
# The deploy target only works on unix like operating system where
# the Python plugin directory is located at:
# $HOME/$(QGISDIR)/python/plugins
mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(COMPILED_UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(COMPILED_RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help
# Copy extra directories if any
#(foreach EXTRA_DIR,(EXTRA_DIRS), cp -R (EXTRA_DIR) (HOME)/(QGISDIR)/python/plugins/(PLUGINNAME)/;)


# The dclean target removes compiled python files from plugin directory
# also deletes any .svn entry
# also deletes any .git entry
dclean:
@echo
@echo "-----------------------------------"
@echo "Removing any compiled python files."
@echo "-----------------------------------"
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".svn" -prune -exec rm -Rf {} \;
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} \;


derase:
Expand Down Expand Up @@ -161,7 +180,7 @@ transcompile:
@echo "Compiled translation files to .qm files."
@echo "----------------------------------------"
@chmod +x scripts/compile-strings.sh
@scripts/compile-strings.sh $(LOCALES)
@scripts/compile-strings.sh $(LRELEASE) $(LOCALES)

transclean:
@echo
Expand Down Expand Up @@ -205,4 +224,7 @@ pep8:
@echo "-----------"
@echo "PEP8 issues"
@echo "-----------"
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude pydev,resources_rc.py,conf.py . || true
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude $(PEP8EXCLUDE) . || true
@echo "-----------"
@echo "Ignored in PEP8 check:"
@echo $(PEP8EXCLUDE)
3 changes: 1 addition & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ What's Next:
For more information, see the PyQGIS Developer Cookbook at:
http://www.qgis.org/pyqgis-cookbook/index.html

(C) 2011-2014 GeoApt LLC - geoapt.com
Git revision : $Format:%H$
(C) 2011-2018 GeoApt LLC - geoapt.com
5 changes: 3 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
LiteratureMapper
A QGIS plugin
Add spatial locations to the citations in your Zotero database.
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin : 2015-06-06
copyright : (C) 2015 by Michele Tobias & Alex Mandel
begin : 2018-11-15
copyright : (C) 2018 by Michele Tobias & Alex Mandel
email : mmtobias@ucdavis.edu
git sha : $Format:%H$
***************************************************************************/
Expand Down
14 changes: 7 additions & 7 deletions help/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@

# General information about the project.
project = u'LiteratureMapper'
copyright = u'2013, Michele Tobias & Alex Mandel'
copyright = u'2013-2018, Michele Tobias & Alex Mandel'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1'
version = '0.3'
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = '0.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -178,8 +178,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'LiteratureMapper.tex', u'LiteratureMapper Documentation',
u'Michele Tobias & Alex Mandel', 'manual'),
('index', 'LiteratureMapper.tex', 'LiteratureMapper Documentation',
'Michele Tobias & Alex Mandel', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -211,6 +211,6 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'TemplateClass', u'LiteratureMapper Documentation',
[u'Michele Tobias & Alex Mandel'], 1)
('index', 'TemplateClass', 'LiteratureMapper Documentation',
['Michele Tobias & Alex Mandel'], 1)
]
Loading

0 comments on commit 92546a9

Please sign in to comment.