aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-09-27 14:31:35 +0300
committerFrederick Muriuki Muriithi2023-09-27 14:31:35 +0300
commit9961237078834c342e5bf7d7d6ffd7f27be09c67 (patch)
treea31f0def9a2306e8aa73c923969dda96dbcd9537
parent971c15423bbc3c090c28eca7a50caf90a5ad5411 (diff)
downloadgn-auth-9961237078834c342e5bf7d7d6ffd7f27be09c67.tar.gz
List all packages to install.
-rwxr-xr-xsetup.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index d5c8aed..d710821 100755
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Setup script for GeneNetwork Auth package."""
+import glob
from setuptools import setup
from setup_commands import RunTests
@@ -8,6 +9,14 @@ gn-auth project is the authentication/authorisation server to be used
across all GeneNetwork services.
"""
+def get_packages(dir_path):
+ "get package relative to name of directory"
+ dir_name = Path(dir_path).absolute().name
+ return list(".".join(path) for path in
+ (path[0:-1] for path in
+ (path.split("/") for path in
+ glob.glob(f"{dir_name}/**/__init__.py", recursive=True))))
+
setup(author="Frederick M. Muriithi",
author_email="fredmanglis@gmail.com",
description=(
@@ -32,7 +41,7 @@ setup(author="Frederick M. Muriithi",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
name="gn-auth",
- packages = ["gn_auth"],
+ packages = get_packages("./gn_auth"),
url="https://github.com/genenetwork/gn-auth",
version="0.0.1",
tests_require=["pytest", "hypothesis"],