Lowercase the appname.
This commit is contained in:
parent
f39a8c0b1a
commit
430caaf334
|
@ -9,4 +9,4 @@ Changelog.patool*
|
|||
/doc/README.md
|
||||
/testresults.txt
|
||||
/tests/__pycache__
|
||||
/_Patool_configdata.py
|
||||
/_patool_configdata.py
|
||||
|
|
31
Makefile
31
Makefile
|
@ -4,16 +4,15 @@ VERSION:=$(shell $(PYTHON) setup.py --version)
|
|||
MAINTAINER:=$(shell $(PYTHON) setup.py --maintainer)
|
||||
AUTHOR:=$(shell $(PYTHON) setup.py --author)
|
||||
APPNAME:=$(shell $(PYTHON) setup.py --name)
|
||||
LAPPNAME:=$(shell echo $(APPNAME)|tr "[A-Z]" "[a-z]")
|
||||
ARCHIVE_SOURCE:=$(LAPPNAME)-$(VERSION).tar.gz
|
||||
ARCHIVE_WIN32:=$(LAPPNAME)-$(VERSION).exe
|
||||
ARCHIVE_SOURCE:=$(APPNAME)-$(VERSION).tar.gz
|
||||
ARCHIVE_WIN32:=$(APPNAME)-$(VERSION).exe
|
||||
GITUSER:=wummel
|
||||
GITREPO:=$(LAPPNAME)
|
||||
GITREPO:=$(APPNAME)
|
||||
HOMEPAGE:=$(HOME)/public_html/patool-webpage.git
|
||||
WEBMETA:=doc/web/app.yaml
|
||||
DEBUILDDIR:=$(HOME)/projects/debian/official
|
||||
DEBORIGFILE:=$(DEBUILDDIR)/$(LAPPNAME)_$(VERSION).orig.tar.gz
|
||||
DEBPACKAGEDIR:=$(DEBUILDDIR)/$(LAPPNAME)-$(VERSION)
|
||||
DEBORIGFILE:=$(DEBUILDDIR)/$(APPNAME)_$(VERSION).orig.tar.gz
|
||||
DEBPACKAGEDIR:=$(DEBUILDDIR)/$(APPNAME)-$(VERSION)
|
||||
# Pytest options:
|
||||
# --resultlog: write test results in file
|
||||
# -s: do not capture stdout/stderr (some tests fail otherwise)
|
||||
|
@ -28,7 +27,8 @@ all:
|
|||
|
||||
dist:
|
||||
[ -d dist ] || mkdir dist
|
||||
git archive --format=tar --prefix=$(LAPPNAME)-$(VERSION)/ HEAD | gzip -9 > dist/$(ARCHIVE_SOURCE)
|
||||
$(PYTHON) setup.py sdist --formats=tar
|
||||
gzip --best dist/$(APPNAME)-$(VERSION).tar
|
||||
[ ! -f ../$(ARCHIVE_WIN32) ] || cp ../$(ARCHIVE_WIN32) dist
|
||||
|
||||
sign:
|
||||
|
@ -44,15 +44,16 @@ upload_binary:
|
|||
cp dist/$(ARCHIVE_WIN32) dist/$(ARCHIVE_WIN32).asc \
|
||||
$(HOMEPAGE)/dist
|
||||
|
||||
homepage:
|
||||
update_webmeta:
|
||||
# update metadata
|
||||
@echo "version: \"$(VERSION)\"" > $(WEBMETA)
|
||||
@echo "name: \"$(APPNAME)\"" >> $(WEBMETA)
|
||||
@echo "lname: \"$(LAPPNAME)\"" >> $(WEBMETA)
|
||||
@echo "maintainer: \"$(MAINTAINER)\"" >> $(WEBMETA)
|
||||
@echo "author: \"$(AUTHOR)\"" >> $(WEBMETA)
|
||||
git add $(WEBMETA)
|
||||
git cm "Updated web meta data."
|
||||
|
||||
homepage: update_webmeta
|
||||
# relase website
|
||||
$(MAKE) -C doc/web release
|
||||
|
||||
|
@ -71,7 +72,7 @@ register:
|
|||
@echo "Register at Python Package Index..."
|
||||
$(PYTHON) setup.py register
|
||||
@echo "Submitting to freecode.org..."
|
||||
freecode-submit < $(LAPPNAME).freecode
|
||||
freecode-submit < $(APPNAME).freecode
|
||||
|
||||
releasecheck: test check
|
||||
@if egrep -i "xx\.|xxxx|\.xx" doc/changelog.txt > /dev/null; then \
|
||||
|
@ -81,8 +82,8 @@ releasecheck: test check
|
|||
echo "Missing WIN32 distribution archive at ../$(ARCHIVE_WIN32)"; \
|
||||
false; \
|
||||
fi
|
||||
@if ! grep "Version: $(VERSION)" $(LAPPNAME).freecode > /dev/null; then \
|
||||
echo "Could not release: edit $(LAPPNAME).freecode version"; false; \
|
||||
@if ! grep "Version: $(VERSION)" $(APPNAME).freecode > /dev/null; then \
|
||||
echo "Could not release: edit $(APPNAME).freecode version"; false; \
|
||||
fi
|
||||
$(PYTHON) setup.py check --restructuredtext
|
||||
|
||||
|
@ -119,14 +120,14 @@ localbuild:
|
|||
test: localbuild
|
||||
$(PYTHON) -m pytest $(PYTESTOPTS) $(TESTOPTS) $(TESTS)
|
||||
|
||||
doc/$(LAPPNAME).txt: doc/$(LAPPNAME).1
|
||||
doc/$(APPNAME).txt: doc/$(APPNAME).1
|
||||
# make text file from man page for Windows builds
|
||||
cols=`stty size | cut -d" " -f2`; stty cols 72; man -l $< | sed -e 's/.\cH//g' > $@; stty cols $$cols
|
||||
|
||||
deb:
|
||||
# build a debian package
|
||||
[ -f $(DEBORIGFILE) ] || cp dist/$(ARCHIVE_SOURCE) $(DEBORIGFILE)
|
||||
sed -i -e 's/VERSION_$(LAPPNAME):=.*/VERSION_$(LAPPNAME):=$(VERSION)/' $(DEBUILDDIR)/$(LAPPNAME).mak
|
||||
sed -i -e 's/VERSION_$(APPNAME):=.*/VERSION_$(LAPPNAME):=$(VERSION)/' $(DEBUILDDIR)/$(LAPPNAME).mak
|
||||
[ -d $(DEBPACKAGEDIR) ] || (cd $(DEBUILDDIR); \
|
||||
patool extract $(DEBORIGFILE); \
|
||||
cd $(CURDIR); \
|
||||
|
@ -134,7 +135,7 @@ deb:
|
|||
cp -r debian $(DEBPACKAGEDIR); \
|
||||
rm -f $(DEBPACKAGEDIR)/debian/.gitignore; \
|
||||
git checkout master)
|
||||
$(MAKE) -C $(DEBUILDDIR) $(LAPPNAME)_clean $(LAPPNAME)
|
||||
$(MAKE) -C $(DEBUILDDIR) $(APPNAME)_clean $(APPNAME)
|
||||
|
||||
update-copyright:
|
||||
# update-copyright is a local tool which updates the copyright year for each
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
version: "1.6"
|
||||
name: "Patool"
|
||||
lname: "patool"
|
||||
name: "patool"
|
||||
maintainer: "Bastian Kleineidam"
|
||||
author: "Bastian Kleineidam"
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
</header>
|
||||
|
||||
<section id="downloads" class="clearfix">
|
||||
<a href="http://wummel.github.io/{{site.app.lname}}/dist/{{site.app.lname}}-{{site.app.version}}.tar.gz"
|
||||
<a href="http://wummel.github.io/{{site.app.name}}/dist/{{site.app.name}}-{{site.app.version}}.tar.gz"
|
||||
title="Download source .tar.gz package"
|
||||
id="download-tar-gz" class="button"><span>{{site.app.lname}}-{{site.app.version}}.tar.gz</span></a>
|
||||
<a href="http://wummel.github.io/{{site.app.lname}}/dist/{{site.app.lname}}-{{site.app.version}}.exe"
|
||||
id="download-tar-gz" class="button"><span>{{site.app.name}}-{{site.app.version}}.tar.gz</span></a>
|
||||
<a href="http://wummel.github.io/{{site.app.name}}/dist/{{site.app.name}}-{{site.app.version}}.exe"
|
||||
title="Download Windows .exe installer"
|
||||
id="download-exe" class="button"><span>{{site.app.lname}}-{{site.app.version}}.exe</span></a>
|
||||
id="download-exe" class="button"><span>{{site.app.name}}-{{site.app.version}}.exe</span></a>
|
||||
<a href="https://github.com/wummel/patool" id="view-on-github" class="button"><span>View on GitHub</span></a>
|
||||
<!-- <p>
|
||||
<a href="https://github.com/wummel/patool/blob/master/patool.freecode">Release notes</a>
|
||||
|
|
15
setup.py
15
setup.py
|
@ -44,12 +44,11 @@ try:
|
|||
except ImportError:
|
||||
from distutils.core import Distribution
|
||||
executables = None
|
||||
from distutils.command.register import register
|
||||
from distutils.command.install_lib import install_lib
|
||||
from distutils import util
|
||||
from distutils.file_util import write_file
|
||||
|
||||
AppName = "Patool"
|
||||
AppName = "patool"
|
||||
AppVersion = "1.6"
|
||||
MyName = "Bastian Kleineidam"
|
||||
MyEmail = "bastian.kleineidam@web.de"
|
||||
|
@ -272,7 +271,6 @@ class InnoScript:
|
|||
if not self.dist_dir[-1] in "\\/":
|
||||
self.dist_dir += "\\"
|
||||
self.name = AppName
|
||||
self.lname = AppName.lower()
|
||||
self.version = AppVersion
|
||||
self.windows_exe_files = [self.chop(p) for p in windows_exe_files]
|
||||
self.console_exe_files = [self.chop(p) for p in console_exe_files]
|
||||
|
@ -416,16 +414,6 @@ except ImportError:
|
|||
pass
|
||||
|
||||
|
||||
class MyRegister (register, object):
|
||||
"""Custom register command."""
|
||||
|
||||
def build_post_data(self, action):
|
||||
"""Force application name to lower case."""
|
||||
data = super(MyRegister, self).build_post_data(action)
|
||||
data['name'] = data['name'].lower()
|
||||
return data
|
||||
|
||||
|
||||
args = dict(
|
||||
name = AppName,
|
||||
version = AppVersion,
|
||||
|
@ -474,7 +462,6 @@ installed.
|
|||
cmdclass = {
|
||||
'install_lib': MyInstallLib,
|
||||
'py2exe': MyPy2exe,
|
||||
'register': MyRegister,
|
||||
},
|
||||
options = {
|
||||
"py2exe": py2exe_options,
|
||||
|
|
Loading…
Reference in New Issue