From 8bec272fd0d066bf58f4e24e5875be78b0d111e3 Mon Sep 17 00:00:00 2001 From: Ryan Cox Date: Tue, 10 Jun 2025 15:10:38 -0700 Subject: [PATCH] Switch to poetry --- .gitignore | 3 +++ README.md | 9 +++++---- pyproject.toml | 15 +++++++++++++++ setup.py | 50 -------------------------------------------------- 4 files changed, 23 insertions(+), 54 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index bbce85e..a1c1988 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,9 @@ var/ *.manifest *.spec +# Poetry +poetry.lock + # Installer logs pip-log.txt pip-delete-this-directory.txt diff --git a/README.md b/README.md index b5e3a8a..425bb40 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ motionless motionless is a Python library that takes the pain out of generating [Google Static Map](http://code.google.com/apis/maps/documentation/staticmaps/) URLs. Three map types are supported. Each is illustrated below. For fully worked code see the examples directory for code that parses and visualizes both GeoRSS feeds and GPX files. -motionless is tested with Python versions 3.9 to 3.11. +motionless requires Python 3.12 or newer and uses Poetry for packaging. Code is licensed under Apache 2.0 @@ -26,13 +26,14 @@ generate and use a personal API key. Installation instructions ========================= -Motionless is a pure python package. Install it with conda (or mamba): +Motionless is a pure Python package managed with Poetry. Install dependencies +with [uv](https://github.com/astral-sh/uv): ``` -$ conda install -c conda-forge motionless +$ uv pip install -e . ``` -or pip: +You can still install from PyPI with pip: ``` $ pip install motionless diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..609fe77 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[tool.poetry] +name = "motionless" +version = "1.4.dev" +description = "An easy way to generate Google Static Map URLs with Python." +authors = ["Ryan Cox "] +license = "Apache-2.0" +readme = "README.md" +packages = [{ include = "motionless" }] + +[tool.poetry.dependencies] +python = ">=3.12" + +[build-system] +requires = ["poetry-core>=1.5.0"] +build-backend = "poetry.core.masonry.api" diff --git a/setup.py b/setup.py deleted file mode 100644 index 025926e..0000000 --- a/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/python - -from motionless import __version__ - -# Distutils version -METADATA = dict( - name = "motionless", - version = __version__, - packages = ['motionless'], - author = 'Ryan Cox', - author_email = 'ryan.a.cox@gmail.com', - description = 'An easy way to generate Google Static Map URLs with Python.', - license = 'Apache 2.0 License', - url = 'http://github.com/ryancox/motionless', - keywords = 'google static maps url api georss mapping gpx kml geo gis', - test_suite='tests', - tests_require=[], -) - -# Setuptools version -SETUPTOOLS_METADATA = dict( - install_requires = ['setuptools'], - include_package_data = True, - classifiers = [ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Multimedia :: Graphics :: Presentation', - 'Topic :: Internet', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - ] -) - -def Main(): - try: - import setuptools - METADATA.update(SETUPTOOLS_METADATA) - setuptools.setup(**METADATA) - except ImportError: - import distutils.core - distutils.core.setup(**METADATA) - -if __name__ == '__main__': - Main()