-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (37 loc) · 1.18 KB
/
setup.py
File metadata and controls
46 lines (37 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import os
import pip
from setuptools import setup
from setuptools.command.install import install
PACKAGE_NAME = "sultanconnect"
__version__ = '2025.10.08'
SOURCES = {
"sultanconnect-dataframe": "sultanconnect-dataframe",
"sultanconnect-orm": "sultanconnect-orm",
}
class InstallCmd(install):
"""Add custom steps for the installation command"""
def run(self):
wd = os.getcwd()
for k, v in SOURCES.items():
try:
os.chdir(os.path.join(wd, v))
pip.main(["install", "."])
except Exception as e:
print("Subhanallah, something went wrong installing", k)
print(e)
finally:
os.chdir(wd)
install.run(self)
setup(
title="Sultanconnect",
name=PACKAGE_NAME,
version=__version__,
author='Apriliansyah Idris',
author_email='apriliansyahidris@gmail.com',
description="Unofficial Python API for Sultan Point of Sale",
url="https://github.com/DeeloaSociety/sultanconnect",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
license="MIT license",
cmdclass={"install": InstallCmd},
)