2016-03-14 05:26:59 -05:00
|
|
|
#########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2024-01-01 02:43:48 -06:00
|
|
|
# Copyright (C) 2013 - 2024, The pgAdmin Development Team
|
2016-03-14 05:26:59 -05:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
2020-04-30 02:21:58 -05:00
|
|
|
import builtins
|
2019-03-20 06:17:51 -05:00
|
|
|
import os
|
2016-03-14 05:26:59 -05:00
|
|
|
import sys
|
2024-07-10 07:13:13 -05:00
|
|
|
import platform
|
2020-04-30 02:21:58 -05:00
|
|
|
from codecs import open
|
|
|
|
from importlib.machinery import SourceFileLoader
|
2016-03-14 05:26:59 -05:00
|
|
|
|
|
|
|
from setuptools import setup
|
|
|
|
|
2020-04-30 02:21:58 -05:00
|
|
|
|
|
|
|
# Load a source file
|
|
|
|
def load_source(name, path):
|
|
|
|
if not os.path.exists(path):
|
|
|
|
print("ERROR: Could not find %s" % path)
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
return SourceFileLoader(name, path).load_module()
|
|
|
|
|
2017-08-25 06:17:47 -05:00
|
|
|
|
|
|
|
# Ensure the global server mode is set.
|
|
|
|
builtins.SERVER_MODE = None
|
|
|
|
|
2016-03-14 05:26:59 -05:00
|
|
|
# Get the requirements list for the current version of Python
|
2019-03-20 06:17:51 -05:00
|
|
|
req_file = '../requirements.txt'
|
2016-03-14 05:26:59 -05:00
|
|
|
|
2020-04-30 02:21:58 -05:00
|
|
|
with open(req_file, 'r') as req_lines:
|
2020-11-26 00:13:08 -06:00
|
|
|
all_requires = req_lines.read().splitlines()
|
2016-03-14 05:26:59 -05:00
|
|
|
|
2020-11-26 00:13:08 -06:00
|
|
|
requires = []
|
2021-03-08 05:33:00 -06:00
|
|
|
kerberos_extras = []
|
2023-02-15 00:01:29 -06:00
|
|
|
# Ensure the Wheel will use psycopg-binary, not the source distro, and stick
|
2021-03-08 05:33:00 -06:00
|
|
|
# gssapi in it's own list
|
2020-11-26 00:13:08 -06:00
|
|
|
for index, req in enumerate(all_requires):
|
2023-03-14 05:29:49 -05:00
|
|
|
if 'psycopg[c]' in req:
|
2024-07-10 07:13:13 -05:00
|
|
|
# Starting from Psycopg 3.1.20, ARM64 macOS binary packages are no
|
|
|
|
# longer available for macOS versions before 14.0.
|
2024-08-05 02:01:28 -05:00
|
|
|
_req = req.replace('psycopg[c]', 'psycopg[binary]')
|
|
|
|
req = "psycopg[binary] == 3.1.19; sys_platform == 'darwin' and" \
|
|
|
|
" platform_machine == 'arm64' and platform_release < '23.0' \n"\
|
|
|
|
+ _req + "; (sys_platform == 'darwin' and" \
|
|
|
|
" platform_machine == 'arm64' and" \
|
|
|
|
" platform_release >= '23.0') or" \
|
|
|
|
" (sys_platform == 'darwin' and" \
|
|
|
|
" platform_machine != 'arm64'" \
|
|
|
|
") or sys_platform != 'darwin'"
|
2020-11-26 00:13:08 -06:00
|
|
|
|
2021-03-08 05:33:00 -06:00
|
|
|
if 'gssapi' in req:
|
|
|
|
kerberos_extras.append(req)
|
|
|
|
else:
|
|
|
|
requires.append(req)
|
2019-03-20 06:17:51 -05:00
|
|
|
|
2020-04-30 02:21:58 -05:00
|
|
|
# Get the version
|
2023-08-17 03:30:56 -05:00
|
|
|
path = '../web/'
|
|
|
|
if not os.path.exists(path):
|
|
|
|
print("ERROR: Could not find %s" % path)
|
|
|
|
sys.exit(1)
|
|
|
|
sys.path.append(path)
|
|
|
|
import config
|
2016-03-14 05:26:59 -05:00
|
|
|
|
|
|
|
setup(
|
|
|
|
name='pgadmin4',
|
|
|
|
|
2020-04-30 02:21:58 -05:00
|
|
|
version=config.APP_VERSION,
|
2016-03-14 05:26:59 -05:00
|
|
|
|
|
|
|
description='PostgreSQL Tools',
|
2021-12-06 11:06:26 -06:00
|
|
|
long_description='pgAdmin is the most popular and feature rich Open '
|
|
|
|
'Source administration and development platform for '
|
|
|
|
'PostgreSQL, the most advanced Open Source database in '
|
|
|
|
'the world.\n\npgAdmin may be used on Linux, Unix, '
|
|
|
|
'macOS and Windows to manage PostgreSQL and EDB '
|
|
|
|
'Advanced Server 10 and above.',
|
2016-03-14 05:26:59 -05:00
|
|
|
|
2016-05-21 12:54:12 -05:00
|
|
|
url='https://www.pgadmin.org/',
|
2016-03-14 05:26:59 -05:00
|
|
|
|
|
|
|
author='The pgAdmin Development Team',
|
|
|
|
author_email='pgadmin-hackers@postgresql.org',
|
|
|
|
|
|
|
|
license='PostgreSQL Licence',
|
|
|
|
|
|
|
|
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
|
|
classifiers=[
|
2019-03-20 06:17:51 -05:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
|
|
|
|
|
|
|
# Supported programming languages
|
2020-04-24 10:20:25 -05:00
|
|
|
'Programming Language :: Python :: 3.7',
|
2021-03-08 05:33:00 -06:00
|
|
|
'Programming Language :: Python :: 3.8',
|
2021-12-06 10:44:45 -06:00
|
|
|
'Programming Language :: Python :: 3.9',
|
2023-03-14 06:53:05 -05:00
|
|
|
'Programming Language :: Python :: 3.10',
|
|
|
|
'Programming Language :: Python :: 3.11'
|
2019-03-20 06:17:51 -05:00
|
|
|
],
|
2016-03-14 05:26:59 -05:00
|
|
|
|
|
|
|
keywords='pgadmin4,postgresql,postgres',
|
|
|
|
|
2019-03-20 06:17:51 -05:00
|
|
|
packages=["pgadmin4"],
|
2016-03-14 05:26:59 -05:00
|
|
|
|
|
|
|
include_package_data=True,
|
|
|
|
|
2020-04-30 02:21:58 -05:00
|
|
|
install_requires=requires,
|
2016-03-14 05:26:59 -05:00
|
|
|
|
2021-03-08 05:33:00 -06:00
|
|
|
extras_require={
|
|
|
|
"kerberos": kerberos_extras,
|
|
|
|
},
|
2020-11-26 00:13:08 -06:00
|
|
|
|
2019-02-12 08:04:45 -06:00
|
|
|
entry_points={
|
2023-12-21 00:37:26 -06:00
|
|
|
'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main',
|
|
|
|
'pgadmin4-cli=pgadmin4.setup:main'],
|
2019-02-12 08:04:45 -06:00
|
|
|
},
|
2016-03-14 05:26:59 -05:00
|
|
|
|
|
|
|
)
|