• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

rsync wrapper for pushing incremental backups


Commit MetaInfo

Révisionf9cac849ec816677e8beb35afe50a585b97a5786 (tree)
l'heure2019-11-15 17:40:01
AuteurFrank Tobin <ftobin@neve...>
CommiterFrank Tobin

Message de Log

packaging fixes

Change Summary

Modification

diff -r 21d7a7acba0d -r f9cac849ec81 setup.py
--- a/setup.py Thu Nov 14 05:53:33 2019 -0500
+++ b/setup.py Fri Nov 15 03:40:01 2019 -0500
@@ -1,27 +1,44 @@
11 #!/usr/bin/python3
22
3+import os
34 import setuptools
45 import subprocess
56 import setuptools.command.sdist
7+import setuptools.command.install
68 from distutils import log
79
810 with open("README.md", "r") as fh:
911 long_description = fh.read()
1012
1113
14+manpage = 'rsnappush.1'
15+
16+def run(cmd):
17+ log.info("calling " + ' '.join(cmd))
18+ subprocess.run(cmd, check=True)
19+
20+
1221 class my_sdist(setuptools.command.sdist.sdist):
1322 def run(self):
1423 cmd = ["ronn", "--roff", "README.md"]
15- log.info("calling " + ' '.join(cmd))
16- subprocess.run(cmd, check=True)
24+ run(cmd)
1725
1826 cmd = ["mv", "README.1", "rsnappush.1"]
19- log.info("calling " + ' '.join(cmd))
20- subprocess.run(cmd, check=True)
27+ run(cmd)
2128
2229 super().run()
2330
2431
32+class my_install(setuptools.command.install.install):
33+ def run(self):
34+ os.umask(0o002)
35+ run(['chmod', '-R', 'a+rX', 'rsnappush.egg-info'])
36+
37+ stat = os.stat(manpage)
38+ os.chmod(manpage, stat.st_mode | 0o444)
39+ super().run()
40+
41+
2542 setuptools.setup(name='rsnappush',
2643 version = '1.1',
2744 packages = setuptools.find_packages(),
@@ -33,6 +50,8 @@
3350 long_description = long_description,
3451 platforms = "POSIX",
3552 scripts=["rsnappush"],
36- data_files=[('share/man/man1/', ['rsnappush.1'])],
37- cmdclass = {'sdist': my_sdist},
53+ data_files=[('share/man/man1/', [manpage])],
54+ cmdclass = {'sdist': my_sdist,
55+ 'install': my_install,
56+ },
3857 )