slpkg/setup.py

40 lines
1.3 KiB
Python
Raw Normal View History

2014-05-07 22:25:26 +03:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
2014-05-09 09:27:55 +03:00
import os, sys, shutil
2014-05-07 22:25:26 +03:00
from distutils.core import setup
2014-05-12 07:52:16 +03:00
from bin.config import __version__, __author__, __homepage__, __email__
2014-05-07 22:25:26 +03:00
setup(
2014-05-12 07:52:16 +03:00
name='slpkg',
2014-05-07 22:25:26 +03:00
py_modules=['slpkg'],
2014-05-12 07:52:16 +03:00
version = __version__,
description = "Python tool to manage Slackware packages",
keywords = ["slackware", "slpkg", "upgrade", "install", "remove",
"view", "slackpkg", "tool"],
author = __author__,
author_email = __email__,
url = __homepage__,
download_url = __homepage__,
scripts=['runner'],
2014-05-07 22:25:26 +03:00
package_data={"": ["LICENSE", "README.rst", "CHANGELOG"]},
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
2014-05-09 23:08:49 +03:00
"Development Status :: 3 - Alpha",
2014-05-09 09:27:55 +03:00
"Topic :: Intersetup.pynet :: Utilities"],
2014-05-07 22:25:26 +03:00
long_description=open("README.rst").read()
)
2014-05-09 09:27:55 +03:00
if 'install' in sys.argv:
2014-05-09 22:54:21 +03:00
man_path = "/usr/man/man8/"
2014-05-09 09:27:55 +03:00
os.system("mkdir -p {}".format(man_path))
if os.path.exists(man_path):
print("Installing man pages")
2014-05-12 07:52:16 +03:00
man_page = "man/slpkg.8.gz"
2014-05-09 09:27:55 +03:00
shutil.copy2(man_page, man_path)
2014-05-09 23:14:03 +03:00
os.chmod(man_path, int('444', 8))