Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/zango-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9' # Specify the Python version you need
python-version: '3.11.8' # Specify the Python version you need

- name: Install Dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions backend/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ djangorestframework==3.15.2
fido2==2.0.0
flake8==6.1.0
flower==2.0.1
git+https://github.com/Healthlane-Technologies/django-allauth.git@feat/forgot_password
GitPython==3.1.43
loguru==0.7.2
lxml==5.3.0
Expand Down
78 changes: 68 additions & 10 deletions backend/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,109 @@

PROJECT_DIR = os.path.dirname(__file__)
REQUIREMENTS_DIR = os.path.join(PROJECT_DIR, "requirements")

README = os.path.join(PROJECT_DIR, "README.md")

PLATFORM_VERSION = "0.6.1"


def get_requirements(env):
with open(os.path.join(REQUIREMENTS_DIR, f"{env}.txt")) as fp:
return [x.strip() for x in fp.read().split("\n") if not x.startswith("#")]
requirements_file = os.path.join(REQUIREMENTS_DIR, f"{env}.txt")

# Check if requirements file exists
if not os.path.exists(requirements_file):
return []

install_requires = get_requirements("base")
with open(requirements_file, encoding="utf-8") as fp:
install_requires = []

for line in fp:
line = line.strip()
if line and not line.startswith("#"):
if line.startswith("git+"):
# Convert git URL to PEP 508 format
if "@" in line:
repo_part, branch_part = line.split("@", 1)
else:
repo_part = line
branch_part = "main"

# Extract package name from git URL
package_name = repo_part.split("/")[-1].replace(".git", "")

# Clean package name (remove any query parameters)
if "?" in package_name:
package_name = package_name.split("?")[0]

# PEP 508 format: package_name @ git+url
pep508_url = f"{package_name} @ {line}"
install_requires.append(pep508_url)
else:
install_requires.append(line)

return install_requires


def get_long_description():
"""Safely read README file"""
try:
with open(README, encoding="utf-8") as f:
return f.read()
except FileNotFoundError:
return "Zango: multi-tenant Django framework for building business apps"


install_requires = get_requirements("base")

setup(
name="zango",
version=PLATFORM_VERSION,
license="Apache License 2.0",
description="Zango: multi-tenant Django framework for building business apps",
long_description=open(README).read(),
long_description=get_long_description(),
long_description_content_type="text/markdown",
author='Zelthy ("Healthlane Technologies")',
author_email="maintainers@zelthy.com",
url="https://github.com/Healthlane-Technologies/zelthy3",
project_urls={
"Bug Reports": "https://github.com/Healthlane-Technologies/zelthy3/issues",
"Source": "https://github.com/Healthlane-Technologies/zelthy3",
"Documentation": "https://github.com/Healthlane-Technologies/zelthy3#readme",
},
package_dir={"": "src"},
packages=find_packages("src"),
package_data={
"zango": [
"cli/project_template/**/*",
"assets/**",
"**/templates/**",
"**/workspace_folder_template/**",
"assets/**/*",
"**/templates/**/*",
"**/workspace_folder_template/**/*",
],
},
include_package_data=True,
install_requires=install_requires,
python_requires=">=3.8",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="django multi-tenant framework business apps",
entry_points={
"console_scripts": [
"zango=zango.cli:cli",
],
},
license_files=["LICENSE"],
zip_safe=False,
)
Loading