46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
|
|
import os
|
||
|
|
import shutil
|
||
|
|
from setuptools import setup, find_packages
|
||
|
|
import glob
|
||
|
|
|
||
|
|
deb_dist_dir = "deb_dist"
|
||
|
|
if os.path.exists(deb_dist_dir):
|
||
|
|
old_versions = glob.glob(os.path.join(deb_dist_dir, "postinstall-0.3.*"))
|
||
|
|
for old_version in old_versions:
|
||
|
|
if os.path.isdir(old_version):
|
||
|
|
shutil.rmtree(old_version)
|
||
|
|
else:
|
||
|
|
os.remove(old_version)
|
||
|
|
|
||
|
|
setup(
|
||
|
|
name="postinstall",
|
||
|
|
version="1.5.0",
|
||
|
|
description="A Dialog TUI application for postinstall system configuration",
|
||
|
|
long_description=open("README.md").read(),
|
||
|
|
long_description_content_type="text/markdown",
|
||
|
|
author="LLC Technologies and Communication",
|
||
|
|
author_email="devteam@texnico.ru",
|
||
|
|
packages=find_packages(),
|
||
|
|
include_package_data=True,
|
||
|
|
package_data={
|
||
|
|
# 'postinstall': ['styles.tcss'],
|
||
|
|
},
|
||
|
|
install_requires=["pythondialog>=3.5.3,<4.0.0"],
|
||
|
|
entry_points={
|
||
|
|
"console_scripts": [
|
||
|
|
"postinstall=postinstall:main",
|
||
|
|
],
|
||
|
|
},
|
||
|
|
classifiers=[
|
||
|
|
"Programming Language :: Python :: 3",
|
||
|
|
"License :: OSI Approved :: MIT License",
|
||
|
|
"Operating System :: OS Independent :: Linux",
|
||
|
|
],
|
||
|
|
python_requires=">=3.11",
|
||
|
|
data_files=[
|
||
|
|
("/usr/share/postinstall", []),
|
||
|
|
("/etc/systemd/system", ["deb/postinstall.service"]),
|
||
|
|
("/etc/profile.d", ["deb/0002-postinstall.sh"]),
|
||
|
|
],
|
||
|
|
)
|