Skip to content

Commit

Permalink
Fix distcheck fail
Browse files Browse the repository at this point in the history
  • Loading branch information
yetist authored and raveit65 committed Feb 18, 2019
1 parent 285937d commit 05e1e93
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ CLEANFILES = $(bin_SCRIPTS) caja-dropbox.1 caja-dropbox.txt
EXTRA_DIST = caja-dropbox.in serializeimages.py caja-dropbox.txt.in docgen.py rst2man.py autogen.sh
man_MANS = caja-dropbox.1

caja-dropbox: caja-dropbox.in serializeimages.py
python3 serializeimages.py $(PACKAGE_VERSION) $(datadir)/applications < caja-dropbox.in > caja-dropbox
caja-dropbox: $(top_srcdir)/caja-dropbox.in $(top_srcdir)/serializeimages.py
python3 $(top_srcdir)/serializeimages.py $(PACKAGE_VERSION) $(datadir)/applications < $(top_srcdir)/caja-dropbox.in > caja-dropbox
chmod +x caja-dropbox

caja-dropbox.1: caja-dropbox.txt.in caja-dropbox docgen.py
python3 docgen.py $(PACKAGE_VERSION) caja-dropbox.txt.in caja-dropbox.txt
caja-dropbox.1: $(top_srcdir)/caja-dropbox.txt.in caja-dropbox $(top_srcdir)/docgen.py
python3 $(top_srcdir)/docgen.py $(PACKAGE_VERSION) $(top_srcdir)/caja-dropbox.txt.in caja-dropbox.txt
$(RST2MAN) caja-dropbox.txt > caja-dropbox.1

SUBDIRS = data src
Expand Down
5 changes: 4 additions & 1 deletion docgen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import unicode_literals
import os
import sys
import datetime
import codecs
Expand All @@ -8,7 +9,9 @@
exec(open("caja-dropbox").read(), env)
commands = env["commands"]

with codecs.open("AUTHORS", "r", "utf-8") as afile:
selfpath = os.path.abspath(sys.argv[0])
top_srcdir = os.path.dirname(selfpath)
with codecs.open(os.path.join(top_srcdir, "AUTHORS"), "r", "utf-8") as afile:
authors = '| ' + afile.read().replace('\n', '\n| ')

with codecs.open(sys.argv[2], "r", encoding="utf-8") as infile:
Expand Down
7 changes: 5 additions & 2 deletions serializeimages.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
import gi
gi.require_version('GdkPixbuf', '2.0')
Expand All @@ -13,8 +14,10 @@ def replace_repl(mo):
return src_re.sub(replace_repl, buf)

if __name__ == '__main__':
pixbuf64 = GdkPixbuf.Pixbuf.new_from_file("data/icons/hicolor/64x64/apps/caja-dropbox.png")
pixbuf16 = GdkPixbuf.Pixbuf.new_from_file("data/icons/hicolor/16x16/apps/caja-dropbox.png")
selfpath = os.path.abspath(sys.argv[0])
top_srcdir = os.path.dirname(selfpath)
pixbuf64 = GdkPixbuf.Pixbuf.new_from_file(os.path.join(top_srcdir, "data/icons/hicolor/64x64/apps/caja-dropbox.png"))
pixbuf16 = GdkPixbuf.Pixbuf.new_from_file(os.path.join(top_srcdir, "data/icons/hicolor/16x16/apps/caja-dropbox.png"))
src2dest = {'@PACKAGE_VERSION@': sys.argv[1],
'@DESKTOP_FILE_DIR@': sys.argv[2],
'@IMAGEDATA64@': ("GdkPixbuf.Pixbuf.new_from_data(%r, GdkPixbuf.Colorspace.RGB, %r, %r, %r, %r, %r)" %
Expand Down

0 comments on commit 05e1e93

Please sign in to comment.