diff --git a/README.md b/README.md index 0fdfeb6..6d044cf 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,47 @@ while multiple IP addresses were configured for the domain. pip install --no-build-isolation . ``` +1. Install the project with pip under python 2.7 get error: + ``` + python --version + Python 2.7.18 + + pip install . + ``` + + Error message: + ``` + ... + Building wheels for collected packages: cryptography + Building wheel for cryptography (PEP 517) ... error + ERROR: Command errored out with exit status 1: + + build/temp.macosx-14.2-arm64-2.7/_openssl.c:18674:10: error: call to undeclared function 'ERR_GET_FUNC'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + return ERR_GET_FUNC(x0); + ^ + build/temp.macosx-14.2-arm64-2.7/_openssl.c:18690:14: error: call to undeclared function 'ERR_GET_FUNC'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + { result = ERR_GET_FUNC(x0); } + ^ + build/temp.macosx-14.2-arm64-2.7/_openssl.c:23389:10: error: call to undeclared function 'FIPS_mode'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + return FIPS_mode(); + ^ + build/temp.macosx-14.2-arm64-2.7/_openssl.c:23400:14: error: call to undeclared function 'FIPS_mode'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + { result = FIPS_mode(); } + ^ + build/temp.macosx-14.2-arm64-2.7/_openssl.c:23415:10: error: call to undeclared function 'FIPS_mode_set'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + return FIPS_mode_set(x0); + ^ + build/temp.macosx-14.2-arm64-2.7/_openssl.c:23431:14: error: call to undeclared function 'FIPS_mode_set'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + { result = FIPS_mode_set(x0); } + ... + ERROR: Failed building wheel for cryptography + ``` + + Solution: + ```sh + brew install openssl@1.1 + ``` + ## 8. Development diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index e94fb37..577593e 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -242,7 +242,8 @@ function main () { declare domain dns_env https_flag=0 \ OPTIND OPTARG opt - while getopts d:E:Sh opt; do + # ignoring the unknown options + while getopts :d:E:Sh opt; do case $opt in d) domain=$OPTARG diff --git a/install.sh b/install.sh index 11493a6..4466973 100644 --- a/install.sh +++ b/install.sh @@ -122,7 +122,7 @@ function main () { # run shadowsocks-manager echo "Running $ssm_container_name ..." - docker run --restart=always -d -p 80:80 --network "$ssm_network_name" -v "$ssm_volume_path:/var/local/ssm" \ + docker run --restart=always -d -p 80:80 -p 443:443 --network "$ssm_network_name" -v "$ssm_volume_path:/var/local/ssm" \ --name "$ssm_container_name" "$ssm_image" "${default_options[@]}" "$@" } diff --git a/pyproject.toml b/pyproject.toml index 7c0749d..7f5b62e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,10 +11,13 @@ dependencies = [ "six", "boto3", "celery", - "Django<4", - "django-allowedsites-dynamic", + # required by dns-lexicon + # 20240526 - py2.7 - cryptography==3.3.2 (latest version for py2.7) requires openssl 1.1 on os. + # "cryptography", + "Django<4", + "django-allowedsites-dynamic", "django-cache-lock", # 20210314 - py2.7 - workaround for: ERROR: Could not find a version that satisfies the requirement django-timezone-field<5.0,>=4.1.0 (from django-celery-beat->-r requirements.txt (line 10)) (from versions: 0.3.1, 0.3.2, 0.4, 1.0, 1.1, 1.2, 1.3, 2.0rc1, 2.0, 2.1, 3.0rc1, 3.0, 3.1) @@ -67,6 +70,11 @@ dependencies = [ # "shadowsocks", # "shadowsocks-alexforks", + # required by dns-lexicon[full] + # 20240526 - py2.7 - workaround for: ERROR: Could not find a version that satisfies the requirement prettytable>=2.0.0 + "Softlayer==5.8.0; python_version <= '2.7'", + "Softlayer; python_version > '2.7'", + "tldextract", "uWSGI", ] diff --git a/setup.cfg b/setup.cfg index b30589c..8628171 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,10 +51,13 @@ install_requires = six boto3 celery - Django<4 - django-allowedsites-dynamic + # required by dns-lexicon + # 20240526 - py2.7 - cryptography==3.3.2 (latest version for py2.7) requires openssl 1.1 on os. + # cryptography + Django<4 + django-allowedsites-dynamic django-cache-lock # 20210314 - py2.7 - workaround for: ERROR: Could not find a version that satisfies the requirement django-timezone-field<5.0,>=4.1.0 (from django-celery-beat->-r requirements.txt (line 10)) (from versions: 0.3.1, 0.3.2, 0.4, 1.0, 1.1, 1.2, 1.3, 2.0rc1, 2.0, 2.1, 3.0rc1, 3.0, 3.1) @@ -78,6 +81,8 @@ install_requires = django-import-export djangorestframework + dns-lexicon[full] + dnspython docopt # ipaddress is available since Python 3.3 @@ -99,11 +104,18 @@ install_requires = pytz requests + # 20240430 - removed. the installation of Shadowsocks service should be handled outside of this project. # 20240417 - workaround for: AttributeError: dlsym(0x8c358790, EVP_CIPHER_CTX_cleanup): symbol not found: File python3.12/site-packages/shadowsocks/crypto/openssl.py, line 52 # 20240417 - py3.10+ - workaround for: AttributeError: module 'collections' has no attribute 'MutableMapping': File python3.12/site-packages/shadowsocks/lru_cache.py, line 34 # shadowsocks - shadowsocks-alexforks + # shadowsocks-alexforks + + # required by dns-lexicon[full] + # 20240526 - py2.7 - workaround for: ERROR: Could not find a version that satisfies the requirement prettytable>=2.0.0 + Softlayer==5.8.0; python_version <= '2.7' + Softlayer; python_version > '2.7' + tldextract uWSGI [options.entry_points]