-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(jans-pycloudlib): move packaging details from setup.py to py…
…project.toml (#10534) * refactor(jans-pycloudlib): move packaging details from setup.py to pyproject.toml Signed-off-by: iromli <[email protected]> * fix(jans-pycloudlib): resolve namespaced package Signed-off-by: iromli <[email protected]> * fix(jans-pycloudlib): use explicit package discovery Signed-off-by: iromli <[email protected]> * fix: disable scanning PEP 420 namespaces Signed-off-by: iromli <[email protected]> * ci: fix test-jans-pycloudlib.yml Signed-off-by: Mohammad Abudayyeh <[email protected]> --------- Signed-off-by: iromli <[email protected]> Signed-off-by: Mohammad Abudayyeh <[email protected]> Co-authored-by: Mohammad Abudayyeh <[email protected]>
- Loading branch information
Showing
3 changed files
with
92 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,93 @@ | ||
[build-system] | ||
requires = [ | ||
# The minimum setuptools version is specific to the PEP 517 backend, | ||
# and may be stricter than the version required in `setup.cfg` | ||
"setuptools>=40.6.0,!=60.9.0", | ||
"wheel", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "jans-pycloudlib" | ||
dynamic = ["version"] | ||
description = "Utilities for Janssen cloud-native deployment" | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "JanssenProject"} | ||
] | ||
maintainers = [ | ||
{name = "Isman Firmansyah", email = "[email protected]"} | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12" | ||
] | ||
dependencies = [ | ||
"requests>=2.22.0", | ||
"python-consul>=1.0.1", | ||
"hvac>=0.7.0", | ||
"kubernetes>=11.0", | ||
|
||
# the ldap3 library is not removed for the following reasons: | ||
# | ||
# - it's still used by `jans.pycloudlib.utils.ldap_encode` (hashed function) | ||
# - it's still used by `jans.pycloudlib.persistence.sql.doc_id_from_dn` (parse_dn function) | ||
# - vendoring hashed and parse_dn functions from ldap3 library will need testcases, which we can avoid by reusing the original functions | ||
# - LDAP/LDIF DN is still used heavily in Janssen data design | ||
# | ||
"ldap3>=2.5", | ||
|
||
"backoff>=2.1.2", | ||
"docker>=3.7.2", | ||
"requests-toolbelt>=0.9.1", | ||
"cryptography>=2.8", | ||
"google-cloud-secret-manager>=2.2.0", | ||
"pymysql>=1.0.2", | ||
"sqlalchemy>=1.3,<1.4", | ||
"psycopg2>=2.8.6", | ||
"Click>=6.7", | ||
"ldif>=4.1.1", | ||
|
||
# handle CVE-2022-36087 | ||
"oauthlib>=3.2.1", | ||
|
||
"boto3", | ||
"sprig-aes>=0.4.0", | ||
"marshmallow>=3.21.2", | ||
"apispec[marshmallow]>=6.6.1", | ||
"fqdn>=1.5.1", | ||
"pem>=23.1.0", | ||
|
||
# extra dependency for google-cloud-secret-manager | ||
"grpc-interceptor>=0.15.4" | ||
] | ||
requires-python = ">=3.9" | ||
|
||
[project.scripts] | ||
jans-pycloudlib = "jans.pycloudlib.cli:cli" | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/JanssenProject/jans/tree/main/jans-pycloudlib" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
zip-safe = false | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["jans*"] | ||
# disable scanning PEP 420 namespaces | ||
namespaces = false | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "jans.pycloudlib.version.__version__"} | ||
|
||
[tool.pydocstyle] | ||
convention = "google" | ||
inherit = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,4 @@ | ||
import codecs | ||
import os | ||
import re | ||
# handle compatibility | ||
from setuptools import setup | ||
from setuptools import find_packages | ||
|
||
|
||
def find_version(*file_paths): | ||
here = os.path.abspath(os.path.dirname(__file__)) | ||
with codecs.open(os.path.join(here, *file_paths), 'r') as f: | ||
version_file = f.read() | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
setup( | ||
name="jans-pycloudlib", | ||
version=find_version("jans", "pycloudlib", "version.py"), | ||
url="", | ||
license="Apache", | ||
author="Janssen", | ||
author_email="[email protected]", | ||
description="", | ||
long_description=__doc__, | ||
packages=find_packages(), | ||
zip_safe=False, | ||
install_requires=[ | ||
"requests>=2.22.0", | ||
"python-consul>=1.0.1", | ||
"hvac>=0.7.0", | ||
"kubernetes>=11.0", | ||
|
||
# the ldap3 library is not removed for the following reasons: | ||
# | ||
# - it's still used by `jans.pycloudlib.utils.ldap_encode` (hashed function) | ||
# - it's still used by `jans.pycloudlib.persistence.sql.doc_id_from_dn` (parse_dn function) | ||
# - vendoring hashed and parse_dn functions from ldap3 library will need testcases, which we can avoid by reusing the original functions | ||
# - LDAP/LDIF DN is still used heavily in Janssen data design | ||
# | ||
"ldap3>=2.5", | ||
|
||
"backoff>=2.1.2", | ||
"docker>=3.7.2", | ||
"requests-toolbelt>=0.9.1", | ||
"cryptography>=2.8", | ||
"google-cloud-secret-manager>=2.2.0", | ||
"pymysql>=1.0.2", | ||
"sqlalchemy>=1.3,<1.4", | ||
"psycopg2>=2.8.6", | ||
"Click>=6.7", | ||
"ldif>=4.1.1", | ||
# handle CVE-2022-36087 | ||
"oauthlib>=3.2.1", | ||
"boto3", | ||
"sprig-aes>=0.4.0", | ||
"marshmallow>=3.21.2", | ||
"apispec[marshmallow]>=6.6.1", | ||
"fqdn>=1.5.1", | ||
"pem>=23.1.0", | ||
# extra dependency for google-cloud-secret-manager | ||
"grpc-interceptor>=0.15.4", | ||
], | ||
classifiers=[ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
], | ||
include_package_data=True, | ||
entry_points={ | ||
"console_scripts": ["jans-pycloudlib=jans.pycloudlib.cli:cli"], | ||
}, | ||
package_data={ | ||
"jans.pycloudlib": ["py.typed"], | ||
}, | ||
python_requires=">=3.9", | ||
) | ||
setup() |