mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Make 'kerberos' an optional feature in the Python wheel, to avoid the need to install MIT Kerberos on the system by default. Tidy up the Python versioning a little whilst passing. Fixes #6268
This commit is contained in:
parent
059dad747d
commit
5e40f9904d
2
Make.bat
2
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
|
||||
|
@ -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:
|
||||
|
@ -9,6 +9,7 @@ This release contains a number of bug fixes and new features since the release o
|
||||
New features
|
||||
************
|
||||
|
||||
| `Issue #6268 <https://redmine.postgresql.org/issues/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 <https://redmine.postgresql.org/issues/6270>`_ - Added '--replace' option in Import server to replace the list of servers with the newly imported one.
|
||||
|
||||
Housekeeping
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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'],
|
||||
|
@ -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.*
|
||||
|
@ -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'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user