man page install support

This commit is contained in:
dslackw 2014-05-09 09:27:55 +03:00
parent 65fea84bdd
commit 520fbdd484
4 changed files with 28 additions and 5 deletions

View file

@ -1,3 +1,15 @@
09-05-2014
Version 1.0.1
[Feature] - Added support install man page
09-05-2014
Version 1.0.0
[Feature] - Added man page
09-05-2014 09-05-2014
Version 0.0.3 Version 0.0.3

View file

@ -1,6 +1,6 @@
Metadata-Version: 1.1 Metadata-Version: 1.1
Name: slpkg Name: slpkg
Version: 0.0.3 Version: 1.0.1
Author: dslackw Author: dslackw
Author-email: d zlatanidis at gmail com Author-email: d zlatanidis at gmail com
Maintainer: dslackw Maintainer: dslackw

View file

@ -7,7 +7,7 @@ import sys
import argparse import argparse
import subprocess import subprocess
__version__ = "0.0.3" __version__ = "1.0.1"
__author__ = "dslackw" __author__ = "dslackw"
__license__ = "GPLv3" __license__ = "GPLv3"

View file

@ -1,18 +1,20 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os, sys, shutil
from distutils.core import setup from distutils.core import setup
setup( setup(
name='slpkg', name='slpkg',
py_modules=['slpkg'], py_modules=['slpkg'],
version='0.0.3', version='1.0.1,
description="Python tool to manage Slackware packages", description="Python tool to manage Slackware packages",
keywords=["slpkg", "upgrade", "install", "remove", "view", "slackpkg", "tool"], keywords=["slpkg", "upgrade", "install", "remove", "view", "slackpkg", "tool"],
author="dslackw", author="dslackw",
author_email="d.zlatanidis@gmail.com", author_email="d.zlatanidis@gmail.com",
url="https://github.com/dslackw/slpkg", url="https://github.com/dslackw/slpkg",
download_url="https://github.com/dslackw/slpkg/archive/v0.0.3.tar.gz", download_url="https://github.com/dslackw/slpkg/archive/v1.0.1.tar.gz",
scripts=['bin/slpkg'], scripts=['bin/slpkg'],
package_data={"": ["LICENSE", "README.rst", "CHANGELOG"]}, package_data={"": ["LICENSE", "README.rst", "CHANGELOG"]},
classifiers=[ classifiers=[
@ -21,6 +23,15 @@ setup(
"Programming Language :: Python", "Programming Language :: Python",
"Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2.7",
"Development Status :: 0 - Alpha", "Development Status :: 0 - Alpha",
"Topic :: Internet :: Utilities"], "Topic :: Intersetup.pynet :: Utilities"],
long_description=open("README.rst").read() long_description=open("README.rst").read()
) )
if 'install' in sys.argv:
man_path = "/tmp/SBo/package-slpkg/usr/man/man8/"
os.system("mkdir -p {}".format(man_path))
if os.path.exists(man_path):
print("Installing man pages")
man_page = "man/slpkg.8"
shutil.copy2(man_page, man_path)
os.chmod(man_path + 'slpkg.8', int('444', 8))