diff --git a/Make.bat b/Make.bat index 478a5160f..ffa2e9ad2 100644 --- a/Make.bat +++ b/Make.bat @@ -74,7 +74,7 @@ REM Main build sequence Ends SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-%APP_VERSION_SUFFIX%-x64.exe IF "%APP_VERSION_SUFFIX%" == "" SET INSTALLERNAME=%APP_SHORTNAME%-%APP_MAJOR%.%APP_MINOR%-x64.exe - REM get Python version for the runtime build ex. 2.7.1 will be 27 + REM get Python version for the runtime build ex. 3.9.2 will be 39 FOR /f "tokens=1 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MAJOR=%%G FOR /f "tokens=2 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_MINOR=%%G FOR /f "tokens=3 DELims=." %%G IN ('%PGADMIN_PYTHON_DIR%/python.exe -c "import sys; print(sys.version.split(' ')[0])"') DO SET PYTHON_REVISION=%%G diff --git a/README.md b/README.md index b22f0ba13..28a116fae 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ There is no need to increment the SETTINGS_SCHEMA_VERSION. # Configuring the Python Environment In order to run the Python code, a suitable runtime environment is required. -Python version 3.5 and later are currently supported. It is recommended that a +Python version 3.6 and later are currently supported. It is recommended that a Python Virtual Environment is setup for this purpose, rather than using the system Python environment. On Linux and Mac systems, the process is fairly simple - adapt as required for your distribution: diff --git a/docs/en_US/release_notes_5_1.rst b/docs/en_US/release_notes_5_1.rst index 8347f3065..d75338fa4 100644 --- a/docs/en_US/release_notes_5_1.rst +++ b/docs/en_US/release_notes_5_1.rst @@ -9,6 +9,7 @@ This release contains a number of bug fixes and new features since the release o New features ************ +| `Issue #6268 `_ - Make 'kerberos' an optional feature in the Python wheel, to avoid the need to install MIT Kerberos on the system by default. | `Issue #6270 `_ - Added '--replace' option in Import server to replace the list of servers with the newly imported one. Housekeeping diff --git a/pkg/mac/README.md b/pkg/mac/README.md index fa15ee424..868d119d8 100644 --- a/pkg/mac/README.md +++ b/pkg/mac/README.md @@ -13,7 +13,7 @@ Either build the sources or get them from macports or similar: ## Building -1. To bundle a different version of Python from the default of 3.9.0, set the +1. To bundle a different version of Python from the default of 3.9.2, set the *PGADMIN_PYTHON_VERSION* environment variable, e.g: export PGADMIN_PYTHON_VERSION=3.8.5 diff --git a/pkg/mac/build.sh b/pkg/mac/build.sh index 4ef960aff..70c42c516 100755 --- a/pkg/mac/build.sh +++ b/pkg/mac/build.sh @@ -47,8 +47,8 @@ if [ "x${PGADMIN_POSTGRES_DIR}" == "x" ]; then fi if [ "x${PGADMIN_PYTHON_VERSION}" == "x" ]; then - echo "PGADMIN_PYTHON_VERSION not set. Setting it to the default: 3.9.1" - export PGADMIN_PYTHON_VERSION=3.9.1 + echo "PGADMIN_PYTHON_VERSION not set. Setting it to the default: 3.9.2" + export PGADMIN_PYTHON_VERSION=3.9.2 fi source ${SCRIPT_DIR}/build-functions.sh diff --git a/pkg/pip/setup_pip.py b/pkg/pip/setup_pip.py index 210526d4f..38f733966 100644 --- a/pkg/pip/setup_pip.py +++ b/pkg/pip/setup_pip.py @@ -35,23 +35,17 @@ with open(req_file, 'r') as req_lines: all_requires = req_lines.read().splitlines() requires = [] -extras_require = {} -# Remove any requirements with environment specifiers. These -# must be explicitly listed in extras_require below. +kerberos_extras = [] +# Ensure the Wheel will use psycopg2-binary, not the source distro, and stick +# gssapi in it's own list for index, req in enumerate(all_requires): - if ";" in req or req.startswith("#") or req == "": - # Add the pkgs to extras_require - if ";" in req: - pkg, env_spec = req.split(";") - extras_require[env_spec] = extras_require.get(env_spec, []) - extras_require[env_spec].append(pkg) - continue - - # Ensure the Wheel will use psycopg2-binary, not the source distro if 'psycopg2' in req: req = req.replace('psycopg2', 'psycopg2-binary') - requires.append(req) + if 'gssapi' in req: + kerberos_extras.append(req) + else: + requires.append(req) # Get the version config = load_source('APP_VERSION', '../web/config.py') @@ -77,11 +71,10 @@ setup( 'Development Status :: 5 - Production/Stable', # Supported programming languages - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8' + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9' ], keywords='pgadmin4,postgresql,postgres', @@ -92,7 +85,9 @@ setup( install_requires=requires, - extras_require=extras_require, + extras_require={ + "kerberos": kerberos_extras, + }, entry_points={ 'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main'], diff --git a/requirements.txt b/requirements.txt index 82ee01db0..edd7000bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,12 +8,6 @@ # ############################################################################### - -############################################################################## -# NOTE: Any requirements with environment specifiers must be explicitly added -# to pkg/pip/setup_pip.py (in extras_require), otherwise they will be -# ignored when building a PIP Wheel. -############################################################################## cheroot==8.* Flask==1.* Flask-Gravatar==0.* diff --git a/web/regression/requirements.txt b/web/regression/requirements.txt index 2367f2a49..4a14802c1 100644 --- a/web/regression/requirements.txt +++ b/web/regression/requirements.txt @@ -27,8 +27,3 @@ testtools==2.3.0 traceback2==1.4.0 selenium==3.14.0 coverage==5.0.1 -############################################################### -# Modules specifically required for Python3.3 or lesser version -############################################################### -mock===2.0.0; python_version < '3.3' -