From a64164e869e78cefba31e62325080c003e3ce477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alja=C5=BE=20Mur=20Er=C5=BEen?= Date: Fri, 24 May 2024 11:27:10 +0200 Subject: [PATCH] deduplicate another dep --- edgedbpkg/edgedb_ls/__init__.py | 37 +-------------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/edgedbpkg/edgedb_ls/__init__.py b/edgedbpkg/edgedb_ls/__init__.py index 15eb28b..f985b6b 100644 --- a/edgedbpkg/edgedb_ls/__init__.py +++ b/edgedbpkg/edgedb_ls/__init__.py @@ -168,7 +168,7 @@ def get_package_repository( cls, target: targets.Target, io: cleo_io.IO ) -> python.PyPiRepository: repo = super().get_package_repository(target, io) - repo.register_package_impl("cryptography", Cryptography) + repo.register_package_impl("cryptography", edgedb_server.Cryptography) repo.register_package_impl("cffi", edgedb_server.Cffi) repo.register_package_impl("jwcrypto", edgedb_server.JWCrypto) repo.register_package_impl("edgedb", edgedb_server.EdgeDBPython) @@ -280,38 +280,3 @@ def get_conflict_packages( root_version: str, ) -> list[str]: return ["edgedb-common"] - - -class Cryptography(packages.PythonPackage): - def sh_get_build_wheel_env( - self, build: targets.Build, *, site_packages_var: str - ) -> dict[str, str]: - env = dict( - super().sh_get_build_wheel_env( - build, site_packages_var=site_packages_var - ) - ) - env["OPENSSL_STATIC"] = "0" - - openssl_pkg = build.get_package("openssl") - if build.is_bundled(openssl_pkg): - openssl_path = build.get_install_dir( - openssl_pkg, relative_to="pkgsource" - ) - openssl_path /= build.get_full_install_prefix().relative_to("/") - quoted = shlex.quote(str(openssl_path)) - pwd = "$(pwd -P)" - env["OPENSSL_LIB_DIR"] = f"!{pwd}/{quoted}/lib" - env["OPENSSL_INCLUDE_DIR"] = f"!{pwd}/{quoted}/include" - - return env - - def get_requirements(self) -> list[poetry_dep.Dependency]: - reqs = super().get_requirements() - reqs.append(poetry_dep.Dependency("openssl", ">=1.1.1.100")) - return reqs - - def get_build_requirements(self) -> list[poetry_dep.Dependency]: - reqs = super().get_requirements() - reqs.append(poetry_dep.Dependency("openssl-dev", ">=1.1.1.100")) - return reqs