diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..35df886 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,70 @@ +[build-system] +requires = ["setuptools>=64", "setuptools-scm>=8"] +build-backend = "setuptools.build_meta" + +[project] +name = "hippolyzer" +dynamic = ["version"] +description = "Analysis tools for SL-compatible virtual worlds" +readme = "README.md" +license = "LGPL-3.0-only" +requires-python = ">=3.10" +authors = [ + { name = "Salad Dais", email = "83434023+SaladDais@users.noreply.github.com" }, +] +classifiers = [ + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Testing", + "Topic :: System :: Networking :: Monitoring", +] +dependencies = [ + "aiohttp<4.0.0", + "arpeggio", + "defusedxml", + "gltflib", + "Glymur<0.9.7", + "idna<3,>=2.5", + "lazy-object-proxy", + "llsd<1.1.0", + "mitmproxy>=11.0.0,<12", + "numpy<2.0", + "outleap<1.0", + "ptpython<4.0", + "pycollada", + "pyside6-essentials", + "qasync", + "recordclass>=0.23.1,<0.24", + "transformations", + "Werkzeug<4.0", +] + +[tool.setuptools.packages.find] +where = ["hippolyzer"] +include = ["hippolyzer*"] +namespaces = false + +[project.scripts] +hippolyzer-cli = "hippolyzer.apps.proxy:main" +hippolyzer-gui = "hippolyzer.apps.proxy_gui:gui_main" + +[project.urls] +Homepage = "https://github.com/SaladDais/Hippolyzer/" + +[tool.black] +line-length = 160 + +[tool.pytest.ini_options] +minversion = "6.0" + +[tool.isort] +profile = "black" + +[tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg index 7ba9512..2753bb7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,3 +10,8 @@ universal = 1 max-line-length = 160 exclude = build/*, .eggs/* ignore = F405, F403, E501, F841, E722, W503, E741, E731 + +[options.extras_require] +test = + pytest + aioresponses diff --git a/setup.py b/setup.py index 1ec45f7..6012477 100644 --- a/setup.py +++ b/setup.py @@ -1,116 +1,6 @@ -""" -Copyright 2008, Linden Research, Inc. - See NOTICE.md for previous contributors -Copyright 2021, Salad Dais -All Rights Reserved. +#!/usr/bin/env python3 -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 3 of the License, or (at your option) any later version. +from setuptools import setup -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this program; if not, write to the Free Software Foundation, -Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -""" - -from os import path - -from setuptools import setup, find_packages - -here = path.abspath(path.dirname(__file__)) - -version = '0.15.6' - -with open(path.join(here, 'README.md')) as readme_fh: - readme = readme_fh.read() - -setup( - name='hippolyzer', - version=version, - description="Analysis tools for SL-compatible virtual worlds", - long_description=readme, - long_description_content_type="text/markdown", - classifiers=[ - "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: System :: Networking :: Monitoring", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Testing", - ], - author='Salad Dais', - author_email='83434023+SaladDais@users.noreply.github.com', - url='https://github.com/SaladDais/Hippolyzer/', - license='LGPLv3', - packages=find_packages(include=["hippolyzer", "hippolyzer.*"]), - package_data={ - 'hippolyzer': [ - 'apps/message_builder.ui', - 'apps/proxy_mainwindow.ui', - 'apps/filter_dialog.ui', - 'apps/addon_dialog.ui', - 'lib/base/message/data/message_template.msg', - 'lib/base/message/data/message.xml', - 'lib/base/network/data/ca-bundle.crt', - 'lib/base/data/static_data.db2', - 'lib/base/data/static_index.db2', - 'lib/base/data/avatar_lad.xml', - 'lib/base/data/male_collada_joints.xml', - 'lib/base/data/avatar_skeleton.xml', - 'lib/base/data/LICENSE-artwork.txt', - ], - }, - entry_points={ - 'console_scripts': { - 'hippolyzer-gui = hippolyzer.apps.proxy_gui:gui_main', - 'hippolyzer-cli = hippolyzer.apps.proxy:main', - } - }, - zip_safe=False, - python_requires='>=3.10', - install_requires=[ - 'llsd<1.1.0', - 'defusedxml', - 'aiohttp<4.0.0', - # Newer recordclasses break! - 'recordclass>=0.23.1,<0.24', - 'lazy-object-proxy', - # requests breaks with newer idna - 'idna<3,>=2.5', - # Needed for mesh format conversion tooling - 'pycollada', - 'transformations', - 'gltflib', - # JP2 codec - 'Glymur<0.9.7', - 'numpy<2.0', - - # Proxy-specific stuff - 'outleap<1.0', - 'arpeggio', - # 12.x will be a major change. - 'mitmproxy>=11.0.0,<12', - 'Werkzeug<4.0', - # For REPLs - 'ptpython<4.0', - # These could be in extras_require if you don't want a GUI. - 'pyside6-essentials', - 'qasync', - ], - tests_require=[ - "pytest", - "aioresponses", - ], -) +if __name__ == "__main__": + setup()