Skip to content

Commit

Permalink
Merge pull request #24 from alexzhangs:develop
Browse files Browse the repository at this point in the history
chore: Update dependencies in pyproject.toml and setup.cfg
fix Docker port issue
fix defect: docker-entrypoint.sh: options -dES may not be processed
  • Loading branch information
alexzhangs authored May 27, 2024
2 parents 076bb34 + 7e6e0ae commit 92ce084
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 7 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}" "$@"
}

Expand Down
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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",
]
Expand Down
18 changes: 15 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -78,6 +81,8 @@ install_requires =

django-import-export
djangorestframework
dns-lexicon[full]
dnspython
docopt

# ipaddress is available since Python 3.3
Expand All @@ -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]
Expand Down

0 comments on commit 92ce084

Please sign in to comment.