rsync wrapper for pushing incremental backups
Revisión | 10a22a22e4643cc46a656bbea486a28626074f1c (tree) |
---|---|
Tiempo | 2019-11-14 19:52:53 |
Autor | Frank Tobin <ftobin@neve...> |
Commiter | Frank Tobin |
packaging updates
@@ -44,9 +44,8 @@ | ||
44 | 44 | ## AUTHORS |
45 | 45 | rsnappush is written by Frank Tobin: <ftobin@neverending.org>, <https://www.neverending.org/> |
46 | 46 | |
47 | -rsnappush is released under the Eclipse Public License 2.0 <https://opensource.org/licenses/EPL-2.0>. | |
47 | +rsnappush is released under the Mozilla Public License 2.0 <https://opensource.org/licenses/MPL-2.0>. | |
48 | 48 | |
49 | 49 | ## SEE ALSO |
50 | 50 | |
51 | 51 | rsync(1), ssh(1) |
52 | - |
@@ -6,7 +6,7 @@ | ||
6 | 6 | Author: Frank Tobin |
7 | 7 | Email: ftobin@neverending.org |
8 | 8 | Author URL: https://www.neverending.org/ |
9 | -License: Eclipse Public License 2.0 (https://opensource.org/licenses/EPL-2.0) | |
9 | +License: Mozilla Public License 2.0 (https://opensource.org/licenses/MPL-2.0) | |
10 | 10 | """ |
11 | 11 | |
12 | 12 | import os |
@@ -1,12 +1,38 @@ | ||
1 | 1 | #!/usr/bin/python3 |
2 | 2 | |
3 | -import distutils.core | |
3 | +import setuptools | |
4 | +import subprocess | |
5 | +import setuptools.command.sdist | |
6 | +from distutils import log | |
4 | 7 | |
5 | -distutils.core.setup(name='rsnappush', | |
6 | - version='1.0', | |
7 | - license = "EPL 2.0", | |
8 | - author = "Frank Tobin", | |
9 | - author_email = "ftobin@neverending.org", | |
10 | - platforms = "POSIX", | |
11 | - scripts=["rsnappush"] | |
8 | +with open("README.md", "r") as fh: | |
9 | + long_description = fh.read() | |
10 | + | |
11 | + | |
12 | +class my_sdist(setuptools.command.sdist.sdist): | |
13 | + def run(self): | |
14 | + cmd = ["ronn", "--roff", "README.md"] | |
15 | + log.info("calling " + ' '.join(cmd)) | |
16 | + subprocess.run(cmd, check=True) | |
17 | + | |
18 | + cmd = ["mv", "README.1", "rsnappush.1"] | |
19 | + log.info("calling " + ' '.join(cmd)) | |
20 | + subprocess.run(cmd, check=True) | |
21 | + | |
22 | + super().run() | |
23 | + | |
24 | + | |
25 | +setuptools.setup(name='rsnappush', | |
26 | + version = '1.1', | |
27 | + packages = setuptools.find_packages(), | |
28 | + url = "https://osdn.net/users/ftobin/pf/rsnappush/", | |
29 | + license = "MPL-2.0", | |
30 | + author = "Frank Tobin", | |
31 | + author_email = "ftobin@neverending.org", | |
32 | + description = "rsync-based pushed incremental snapshot", | |
33 | + long_description = long_description, | |
34 | + platforms = "POSIX", | |
35 | + scripts=["rsnappush"], | |
36 | + data_files=[('share/man/man1/', ['rsnappush.1'])], | |
37 | + cmdclass = {'sdist': my_sdist}, | |
12 | 38 | ) |