public inbox for [email protected]
help / color / mirror / Atom feedMaking Kerberos optional in the Python wheel
5+ messages / 3 participants
[nested] [flat]
* Making Kerberos optional in the Python wheel
@ 2021-03-04 10:02 Dave Page <[email protected]>
2021-03-04 10:06 ` Re: Making Kerberos optional in the Python wheel Shaheed Haque <[email protected]>
2021-03-08 11:11 ` Re: Making Kerberos optional in the Python wheel Dave Page <[email protected]>
0 siblings, 2 replies; 5+ messages in thread
From: Dave Page @ 2021-03-04 10:02 UTC (permalink / raw)
To: pgadmin-hackers; +Cc: Shaheed Haque <[email protected]>
There have been a couple of complaints that the latest Python wheel
distribution doesn't install cleanly. This happens when there is no
pre-built gssapi wheel on PyPi that matches the users combination of Python
version and platform, *and* the MIT Kerberos development headers etc. are
not present on the system, so the source wheel cannot be compiled.
This seems like it's a bit onerous on users, especially if they're on
Windows where they'll also need a suitable compiler to be installed. The
attached patch aims to address that by making the Kerberos support optional
(thankfully, Khushboo made the code handle lack of gssapi libraries).
To install without gssapi, users would simply do:
pip install pgadmin4
or
pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl
To install with gssapi:
pip install pgadmin4['kerberos']
or
pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl['kerberos']
The patch also cleans up some old cruft that was required for now
unsupported Python versions.
Thoughts?
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EDB: http://www.enterprisedb.com
Attachments:
[application/octet-stream] optional_kerberos.diff (3.3K, 3-optional_kerberos.diff)
download | inline diff:
Index: pkg/pip/setup_pip.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pkg/pip/setup_pip.py (revision ed6ddbb8de4e29e70c49a1cf7dc8810cd79364ae)
+++ pkg/pip/setup_pip.py (date 1614851487405)
@@ -35,23 +35,17 @@
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,7 +71,6 @@
'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',
@@ -92,7 +85,9 @@
install_requires=requires,
- extras_require=extras_require,
+ extras_require={
+ "kerberos": kerberos_extras,
+ },
entry_points={
'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main'],
Index: requirements.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- requirements.txt (revision ed6ddbb8de4e29e70c49a1cf7dc8810cd79364ae)
+++ requirements.txt (date 1614788829786)
@@ -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.*
Index: web/regression/requirements.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/regression/requirements.txt (revision ed6ddbb8de4e29e70c49a1cf7dc8810cd79364ae)
+++ web/regression/requirements.txt (date 1614790784056)
@@ -27,8 +27,3 @@
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'
-
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Making Kerberos optional in the Python wheel
2021-03-04 10:02 Making Kerberos optional in the Python wheel Dave Page <[email protected]>
@ 2021-03-04 10:06 ` Shaheed Haque <[email protected]>
1 sibling, 0 replies; 5+ messages in thread
From: Shaheed Haque @ 2021-03-04 10:06 UTC (permalink / raw)
To: pgadmin-hackers; Dave Page <[email protected]>
A big thumbs up from me at least :-).
On Thursday, 4 March 2021 10:02:00 GMT Dave Page wrote:
> There have been a couple of complaints that the latest Python wheel
> distribution doesn't install cleanly. This happens when there is no
> pre-built gssapi wheel on PyPi that matches the users combination of Python
> version and platform, *and* the MIT Kerberos development headers etc. are
> not present on the system, so the source wheel cannot be compiled.
>
> This seems like it's a bit onerous on users, especially if they're on
> Windows where they'll also need a suitable compiler to be installed. The
> attached patch aims to address that by making the Kerberos support optional
> (thankfully, Khushboo made the code handle lack of gssapi libraries).
>
> To install without gssapi, users would simply do:
>
> pip install pgadmin4
>
> or
>
> pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl
>
> To install with gssapi:
>
> pip install pgadmin4['kerberos']
>
> or
>
> pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl['kerberos']
>
> The patch also cleans up some old cruft that was required for now
> unsupported Python versions.
>
> Thoughts?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Making Kerberos optional in the Python wheel
2021-03-04 10:02 Making Kerberos optional in the Python wheel Dave Page <[email protected]>
@ 2021-03-08 11:11 ` Dave Page <[email protected]>
2021-03-08 11:20 ` Re: Making Kerberos optional in the Python wheel Khushboo Vashi <[email protected]>
1 sibling, 1 reply; 5+ messages in thread
From: Dave Page @ 2021-03-08 11:11 UTC (permalink / raw)
To: pgadmin-hackers; +Cc: Shaheed Haque <[email protected]>
Has anyone been able to review this?
On Thu, Mar 4, 2021 at 10:02 AM Dave Page <[email protected]> wrote:
> There have been a couple of complaints that the latest Python wheel
> distribution doesn't install cleanly. This happens when there is no
> pre-built gssapi wheel on PyPi that matches the users combination of Python
> version and platform, *and* the MIT Kerberos development headers etc. are
> not present on the system, so the source wheel cannot be compiled.
>
> This seems like it's a bit onerous on users, especially if they're on
> Windows where they'll also need a suitable compiler to be installed. The
> attached patch aims to address that by making the Kerberos support optional
> (thankfully, Khushboo made the code handle lack of gssapi libraries).
>
> To install without gssapi, users would simply do:
>
> pip install pgadmin4
>
> or
>
> pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl
>
> To install with gssapi:
>
> pip install pgadmin4['kerberos']
>
> or
>
> pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl['kerberos']
>
> The patch also cleans up some old cruft that was required for now
> unsupported Python versions.
>
> Thoughts?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Making Kerberos optional in the Python wheel
2021-03-04 10:02 Making Kerberos optional in the Python wheel Dave Page <[email protected]>
2021-03-08 11:11 ` Re: Making Kerberos optional in the Python wheel Dave Page <[email protected]>
@ 2021-03-08 11:20 ` Khushboo Vashi <[email protected]>
2021-03-08 11:35 ` Re: Making Kerberos optional in the Python wheel Dave Page <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Khushboo Vashi @ 2021-03-08 11:20 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Shaheed Haque <[email protected]>
Hi Dave,
The patch looks good to me.
Thanks,
Khushboo
On Mon, Mar 8, 2021 at 4:42 PM Dave Page <[email protected]> wrote:
> Has anyone been able to review this?
>
> On Thu, Mar 4, 2021 at 10:02 AM Dave Page <[email protected]> wrote:
>
>> There have been a couple of complaints that the latest Python wheel
>> distribution doesn't install cleanly. This happens when there is no
>> pre-built gssapi wheel on PyPi that matches the users combination of Python
>> version and platform, *and* the MIT Kerberos development headers etc. are
>> not present on the system, so the source wheel cannot be compiled.
>>
>> This seems like it's a bit onerous on users, especially if they're on
>> Windows where they'll also need a suitable compiler to be installed. The
>> attached patch aims to address that by making the Kerberos support optional
>> (thankfully, Khushboo made the code handle lack of gssapi libraries).
>>
>> To install without gssapi, users would simply do:
>>
>> pip install pgadmin4
>>
>> or
>>
>> pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl
>>
>> To install with gssapi:
>>
>> pip install pgadmin4['kerberos']
>>
>> or
>>
>> pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl['kerberos']
>>
>> The patch also cleans up some old cruft that was required for now
>> unsupported Python versions.
>>
>> Thoughts?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EDB: http://www.enterprisedb.com
>>
>>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Making Kerberos optional in the Python wheel
2021-03-04 10:02 Making Kerberos optional in the Python wheel Dave Page <[email protected]>
2021-03-08 11:11 ` Re: Making Kerberos optional in the Python wheel Dave Page <[email protected]>
2021-03-08 11:20 ` Re: Making Kerberos optional in the Python wheel Khushboo Vashi <[email protected]>
@ 2021-03-08 11:35 ` Dave Page <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Dave Page @ 2021-03-08 11:35 UTC (permalink / raw)
To: Khushboo Vashi <[email protected]>; +Cc: pgadmin-hackers; Shaheed Haque <[email protected]>
Thanks - patch applied, with a couple of other tweaks to version numbers
for Python in the readme's etc.
On Mon, Mar 8, 2021 at 11:20 AM Khushboo Vashi <
[email protected]> wrote:
> Hi Dave,
>
> The patch looks good to me.
>
> Thanks,
> Khushboo
>
> On Mon, Mar 8, 2021 at 4:42 PM Dave Page <[email protected]> wrote:
>
>> Has anyone been able to review this?
>>
>> On Thu, Mar 4, 2021 at 10:02 AM Dave Page <[email protected]> wrote:
>>
>>> There have been a couple of complaints that the latest Python wheel
>>> distribution doesn't install cleanly. This happens when there is no
>>> pre-built gssapi wheel on PyPi that matches the users combination of Python
>>> version and platform, *and* the MIT Kerberos development headers etc. are
>>> not present on the system, so the source wheel cannot be compiled.
>>>
>>> This seems like it's a bit onerous on users, especially if they're on
>>> Windows where they'll also need a suitable compiler to be installed. The
>>> attached patch aims to address that by making the Kerberos support optional
>>> (thankfully, Khushboo made the code handle lack of gssapi libraries).
>>>
>>> To install without gssapi, users would simply do:
>>>
>>> pip install pgadmin4
>>>
>>> or
>>>
>>> pip install pip install /path/to/pgadmin4-5.0-py3-none-any.whl
>>>
>>> To install with gssapi:
>>>
>>> pip install pgadmin4['kerberos']
>>>
>>> or
>>>
>>> pip install pip install
>>> /path/to/pgadmin4-5.0-py3-none-any.whl['kerberos']
>>>
>>> The patch also cleans up some old cruft that was required for now
>>> unsupported Python versions.
>>>
>>> Thoughts?
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EDB: http://www.enterprisedb.com
>>>
>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EDB: http://www.enterprisedb.com
>>
>>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2021-03-08 11:35 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 10:02 Making Kerberos optional in the Python wheel Dave Page <[email protected]>
2021-03-04 10:06 ` Shaheed Haque <[email protected]>
2021-03-08 11:11 ` Dave Page <[email protected]>
2021-03-08 11:20 ` Khushboo Vashi <[email protected]>
2021-03-08 11:35 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox