From 873ea7dd6208cea2cb121850d8c781cc78a65ac1 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 01:09:52 +0200 Subject: [PATCH 01/10] Moves to kivy_garden/ folder --- __init__.py | 3 --- {mapview => kivy_garden/mapview}/__init__.py | 6 +++--- .../mapview}/clustered_marker_layer.py | 0 {mapview => kivy_garden/mapview}/downloader.py | 2 +- {mapview => kivy_garden/mapview}/geojson.py | 0 {mapview => kivy_garden/mapview}/icons/cluster.png | Bin {mapview => kivy_garden/mapview}/icons/marker.png | Bin {mapview => kivy_garden/mapview}/mbtsource.py | 0 {mapview => kivy_garden/mapview}/source.py | 6 +++--- {mapview => kivy_garden/mapview}/types.py | 0 {mapview => kivy_garden/mapview}/utils.py | 0 {mapview => kivy_garden/mapview}/view.py | 6 +++--- tests/test_mapview.py | 2 +- 13 files changed, 11 insertions(+), 14 deletions(-) delete mode 100644 __init__.py rename {mapview => kivy_garden/mapview}/__init__.py (74%) rename {mapview => kivy_garden/mapview}/clustered_marker_layer.py (100%) rename {mapview => kivy_garden/mapview}/downloader.py (99%) rename {mapview => kivy_garden/mapview}/geojson.py (100%) rename {mapview => kivy_garden/mapview}/icons/cluster.png (100%) rename {mapview => kivy_garden/mapview}/icons/marker.png (100%) rename {mapview => kivy_garden/mapview}/mbtsource.py (100%) rename {mapview => kivy_garden/mapview}/source.py (96%) rename {mapview => kivy_garden/mapview}/types.py (100%) rename {mapview => kivy_garden/mapview}/utils.py (100%) rename {mapview => kivy_garden/mapview}/view.py (99%) diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 54edab4..0000000 --- a/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# coding=utf-8 - -from .mapview import * diff --git a/mapview/__init__.py b/kivy_garden/mapview/__init__.py similarity index 74% rename from mapview/__init__.py rename to kivy_garden/mapview/__init__.py index 0b4b9a0..19a6280 100644 --- a/mapview/__init__.py +++ b/kivy_garden/mapview/__init__.py @@ -26,7 +26,7 @@ except KeyError: pass -from mapview.types import Coordinate, Bbox -from mapview.source import MapSource -from mapview.view import MapView, MapMarker, MapLayer, MarkerMapLayer, \ +from kivy_garden.mapview.types import Coordinate, Bbox +from kivy_garden.mapview.source import MapSource +from kivy_garden.mapview.view import MapView, MapMarker, MapLayer, MarkerMapLayer, \ MapMarkerPopup diff --git a/mapview/clustered_marker_layer.py b/kivy_garden/mapview/clustered_marker_layer.py similarity index 100% rename from mapview/clustered_marker_layer.py rename to kivy_garden/mapview/clustered_marker_layer.py diff --git a/mapview/downloader.py b/kivy_garden/mapview/downloader.py similarity index 99% rename from mapview/downloader.py rename to kivy_garden/mapview/downloader.py index 101413c..e5f887e 100644 --- a/mapview/downloader.py +++ b/kivy_garden/mapview/downloader.py @@ -10,7 +10,7 @@ import requests import traceback from time import time -from mapview import CACHE_DIR +from kivy_garden.mapview import CACHE_DIR DEBUG = "MAPVIEW_DEBUG_DOWNLOADER" in environ diff --git a/mapview/geojson.py b/kivy_garden/mapview/geojson.py similarity index 100% rename from mapview/geojson.py rename to kivy_garden/mapview/geojson.py diff --git a/mapview/icons/cluster.png b/kivy_garden/mapview/icons/cluster.png similarity index 100% rename from mapview/icons/cluster.png rename to kivy_garden/mapview/icons/cluster.png diff --git a/mapview/icons/marker.png b/kivy_garden/mapview/icons/marker.png similarity index 100% rename from mapview/icons/marker.png rename to kivy_garden/mapview/icons/marker.png diff --git a/mapview/mbtsource.py b/kivy_garden/mapview/mbtsource.py similarity index 100% rename from mapview/mbtsource.py rename to kivy_garden/mapview/mbtsource.py diff --git a/mapview/source.py b/kivy_garden/mapview/source.py similarity index 96% rename from mapview/source.py rename to kivy_garden/mapview/source.py index 5ae2ce2..7e6c346 100644 --- a/mapview/source.py +++ b/kivy_garden/mapview/source.py @@ -4,10 +4,10 @@ from kivy.metrics import dp from math import cos, ceil, log, tan, pi, atan, exp -from mapview import MIN_LONGITUDE, MAX_LONGITUDE, MIN_LATITUDE, MAX_LATITUDE, \ +from kivy_garden.mapview import MIN_LONGITUDE, MAX_LONGITUDE, MIN_LATITUDE, MAX_LATITUDE, \ CACHE_DIR -from mapview.downloader import Downloader -from mapview.utils import clamp +from kivy_garden.mapview.downloader import Downloader +from kivy_garden.mapview.utils import clamp import hashlib diff --git a/mapview/types.py b/kivy_garden/mapview/types.py similarity index 100% rename from mapview/types.py rename to kivy_garden/mapview/types.py diff --git a/mapview/utils.py b/kivy_garden/mapview/utils.py similarity index 100% rename from mapview/utils.py rename to kivy_garden/mapview/utils.py diff --git a/mapview/view.py b/kivy_garden/mapview/view.py similarity index 99% rename from mapview/view.py rename to kivy_garden/mapview/view.py index 75e6a4f..b5b3d5c 100644 --- a/mapview/view.py +++ b/kivy_garden/mapview/view.py @@ -18,10 +18,10 @@ from kivy.lang import Builder from kivy.compat import string_types from math import ceil -from mapview import MIN_LONGITUDE, MAX_LONGITUDE, MIN_LATITUDE, MAX_LATITUDE, \ +from kivy_garden.mapview import MIN_LONGITUDE, MAX_LONGITUDE, MIN_LATITUDE, MAX_LATITUDE, \ CACHE_DIR, Coordinate, Bbox -from mapview.source import MapSource -from mapview.utils import clamp +from kivy_garden.mapview.source import MapSource +from kivy_garden.mapview.utils import clamp from itertools import takewhile import webbrowser diff --git a/tests/test_mapview.py b/tests/test_mapview.py index df710c3..4023003 100644 --- a/tests/test_mapview.py +++ b/tests/test_mapview.py @@ -1,5 +1,5 @@ import unittest -from mapview import MapView +from kivy_garden.mapview import MapView class TextInputTest(unittest.TestCase): From fe36d2e3227f06f48668b77137ece3429e49e49a Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 01:20:44 +0200 Subject: [PATCH 02/10] Adapts tox and drops Python 2 --- README.md | 2 +- tox.ini | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8e4ad84..58a20b1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Mapview [![Github Build Status](https://github.com/kivy-garden/mapview/workflows/Garden%20flower/badge.svg)](https://github.com/kivy-garden/mapview/actions) -[![Build Status](https://travis-ci.com/kivy-garden/garden.mapview.svg?branch=master)](https://travis-ci.com/kivy-garden/garden.mapview) +[![Build Status](https://travis-ci.com/kivy-garden/mapview.svg?branch=develop)](https://travis-ci.com/kivy-garden/mapview) Mapview is a Kivy widget for displaying interactive maps. It has been designed with lot of inspirations of diff --git a/tox.ini b/tox.ini index 7c3010d..9108fe7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pep8,py27,py36 +envlist = pep8,py36 skipsdist = True # trick to enable pre-installation of Cython # https://stackoverflow.com/a/50081741/185510 @@ -8,17 +8,17 @@ indexserver = [testenv] passenv = DISPLAY XDG_RUNTIME_DIR -basepython = python2.7 deps = :preinstall: Cython==0.28.2 -r{toxinidir}/requirements.txt kivy + pytest commands = - python -m unittest discover --top-level-directory=. --start-directory=tests/ + pytest tests/ [testenv:pep8] deps = flake8 -commands = flake8 mapview/ examples/ +commands = flake8 kivy_garden/ examples/ [flake8] ignore = From a9231ea28acc72ce4e6e6a791ed52acb7d292206 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 01:34:47 +0200 Subject: [PATCH 03/10] Leverages tox for the linting It's best to rely on a single source of truth that can also be ran easily locally. The tox.ini file or other project configuration file can therefore contain the flake8 ignore list. --- .github/workflows/pythonapp.yml | 22 ++++++++-------------- tox.ini | 2 +- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 3304c20..7a2f3c6 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -11,12 +11,9 @@ jobs: with: python-version: 3.x - name: Install dependencies - run: | - python3 -m pip install --upgrade pip virtualenv wheel setuptools - - name: Lint with pycodestyle - run: | - python3 -m pip install flake8 - python3 -m flake8 . --count --ignore=E125,E126,E127,E128,E402,E741,E731,W503,F401,W504,F841 --show-source --statistics --max-line-length=80 --exclude=__pycache__,.tox,.git/,doc/ + run: python3 -m pip install tox>=2.0 + - name: Linting + run: python3 -m tox -e pep8 linux_test: runs-on: ubuntu-18.04 @@ -58,8 +55,7 @@ jobs: draft: true - name: Test with pytest run: | - flower_name=$(python3 -c "print('$GITHUB_REPOSITORY'.split('/')[-1])") - python3 -m pytest --cov=kivy_garden.$flower_name --cov-report term --cov-branch + python3 -m pytest --cov=kivy_garden.mapview --cov-report term --cov-branch tests/ windows_test: runs-on: windows-latest @@ -79,8 +75,7 @@ jobs: run: python -m pip install -e .[dev,ci] --extra-index-url https://kivy-garden.github.io/simple/ - name: Test with pytest run: | - $flower_name=(python -c "print('$GITHUB_REPOSITORY'.split('/')[-1])") - python -m pytest --cov=kivy_garden.$flower_name --cov-report term --cov-branch + python -m pytest --cov=kivy_garden.mapview --cov-report term --cov-branch tests/ docs: runs-on: ubuntu-18.04 @@ -112,7 +107,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - flower_name=$(python3 -c "print('$GITHUB_REPOSITORY'.split('/')[-1])") cp -r doc/build/html ~/docs_temp git config --global user.email "kivy@kivy.org" @@ -123,9 +117,9 @@ jobs: git checkout --orphan gh-pages cp -r .git ~/docs_git cd .. - rm -rf $flower_name - mkdir $flower_name - cd $flower_name + rm -rf mapview + mkdir mapview + cd mapview cp -r ~/docs_git .git cp -r ~/docs_temp/* . touch .nojekyll diff --git a/tox.ini b/tox.ini index 9108fe7..32080d9 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ indexserver = preinstall = https://pypi.python.org/simple [testenv] -passenv = DISPLAY XDG_RUNTIME_DIR +passenv = DISPLAY XDG_RUNTIME_DIR HOME deps = :preinstall: Cython==0.28.2 -r{toxinidir}/requirements.txt From 0974b170c6c3642dd37247edbe40e0ffcf97ccd7 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 02:08:05 +0200 Subject: [PATCH 04/10] Updates setup.py --- kivy_garden/mapview/_version.py | 1 + setup.py | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 kivy_garden/mapview/_version.py diff --git a/kivy_garden/mapview/_version.py b/kivy_garden/mapview/_version.py new file mode 100644 index 0000000..899e700 --- /dev/null +++ b/kivy_garden/mapview/_version.py @@ -0,0 +1 @@ +__version__ = '1.0.0.dev0' diff --git a/setup.py b/setup.py index 0252208..b009ea9 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,7 @@ here = path.abspath(path.dirname(__file__)) -filename = path.join(here, 'kivy_garden', 'flower', '_version.py') -# change this ^^^^^^ +filename = path.join(here, 'kivy_garden', 'mapview', '_version.py') locals = {} with open(filename, "rb") as fh: exec(compile(fh.read(), filename, 'exec'), globals(), locals) @@ -17,12 +16,12 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() -URL = 'https://github.com/kivy-garden/flower' +URL = 'https://github.com/kivy-garden/mapview' setup( - name='kivy_garden.flower', + name='kivy_garden.mapview', version=__version__, - description='A kivy garden flower demo.', + description='A kivy garden mapview demo.', long_description=long_description, long_description_content_type='text/markdown', url=URL, From 1b4bf6cbc432cfa0806571839e865e7831539554 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 02:11:22 +0200 Subject: [PATCH 05/10] Fixes examples to new folder structure --- examples/clustered_geojson.py | 8 ++++---- examples/map_browser.py | 2 +- examples/map_with_marker_popup.py | 3 +-- examples/simple_geojson.py | 6 +++--- examples/simple_map.py | 2 +- examples/simple_mbtiles.py | 4 ++-- examples/test_kdbush.py | 2 +- kivy_garden/mapview/clustered_marker_layer.py | 2 +- kivy_garden/mapview/geojson.py | 6 +++--- kivy_garden/mapview/mbtsource.py | 4 ++-- 10 files changed, 19 insertions(+), 20 deletions(-) diff --git a/examples/clustered_geojson.py b/examples/clustered_geojson.py index 32aa315..06ecbf1 100644 --- a/examples/clustered_geojson.py +++ b/examples/clustered_geojson.py @@ -5,10 +5,10 @@ from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) -from mapview import MapView, MapMarker -from mapview.geojson import GeoJsonMapLayer -from mapview.clustered_marker_layer import ClusteredMarkerLayer -from mapview.utils import haversine, get_zoom_for_radius +from kivy_garden.mapview import MapView, MapMarker +from kivy_garden.mapview.geojson import GeoJsonMapLayer +from kivy_garden.mapview.clustered_marker_layer import ClusteredMarkerLayer +from kivy_garden.mapview.utils import haversine, get_zoom_for_radius source = sys.argv[1] diff --git a/examples/map_browser.py b/examples/map_browser.py index 4aacb27..f8e5117 100644 --- a/examples/map_browser.py +++ b/examples/map_browser.py @@ -6,7 +6,7 @@ sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) root = Builder.load_string(""" -#:import MapSource mapview.MapSource +#:import MapSource kivy_garden.mapview.MapSource : size_hint_y: None diff --git a/examples/map_with_marker_popup.py b/examples/map_with_marker_popup.py index a7446fd..642c87a 100644 --- a/examples/map_with_marker_popup.py +++ b/examples/map_with_marker_popup.py @@ -6,11 +6,10 @@ from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) -import mapview root = Builder.load_string(""" #:import sys sys -#:import MapSource mapview.MapSource +#:import MapSource kivy_garden.mapview.MapSource MapView: lat: 50.6394 lon: 3.057 diff --git a/examples/simple_geojson.py b/examples/simple_geojson.py index 835c107..29b8a9f 100644 --- a/examples/simple_geojson.py +++ b/examples/simple_geojson.py @@ -5,9 +5,9 @@ from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) -from mapview import MapView, MapMarker -from mapview.geojson import GeoJsonMapLayer -from mapview.utils import haversine, get_zoom_for_radius +from kivy_garden.mapview import MapView, MapMarker +from kivy_garden.mapview.geojson import GeoJsonMapLayer +from kivy_garden.mapview.utils import haversine, get_zoom_for_radius if len(sys.argv) > 1: source = sys.argv[1] diff --git a/examples/simple_map.py b/examples/simple_map.py index f5a4dc6..86256ea 100644 --- a/examples/simple_map.py +++ b/examples/simple_map.py @@ -5,7 +5,7 @@ from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) -from mapview import MapView, MapSource +from kivy_garden.mapview import MapView, MapSource kwargs = {} if len(sys.argv) > 1: diff --git a/examples/simple_mbtiles.py b/examples/simple_mbtiles.py index 05cbad6..be3e364 100644 --- a/examples/simple_mbtiles.py +++ b/examples/simple_mbtiles.py @@ -14,8 +14,8 @@ if __name__ == '__main__' and __package__ is None: from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) -from mapview import MapView -from mapview.mbtsource import MBTilesMapSource +from kivy_garden.mapview import MapView +from kivy_garden.mapview.mbtsource import MBTilesMapSource source = MBTilesMapSource(sys.argv[1]) diff --git a/examples/test_kdbush.py b/examples/test_kdbush.py index d4d305b..89b3cc0 100644 --- a/examples/test_kdbush.py +++ b/examples/test_kdbush.py @@ -8,7 +8,7 @@ from kivy.app import App from kivy.uix.widget import Widget from kivy.graphics import Color, Rectangle, Ellipse, Canvas -from mapview.clustered_marker_layer import KDBush, Marker +from kivy_garden.mapview.clustered_marker_layer import KDBush, Marker from random import random # creating markers diff --git a/kivy_garden/mapview/clustered_marker_layer.py b/kivy_garden/mapview/clustered_marker_layer.py index e270e84..b9c7c2e 100644 --- a/kivy_garden/mapview/clustered_marker_layer.py +++ b/kivy_garden/mapview/clustered_marker_layer.py @@ -6,7 +6,7 @@ from os.path import dirname, join from math import sin, log, pi, atan, exp, floor, sqrt -from mapview.view import MapLayer, MapMarker +from kivy_garden.mapview.view import MapLayer, MapMarker from kivy.lang import Builder from kivy.metrics import dp from kivy.properties import (ObjectProperty, NumericProperty, StringProperty, ListProperty) diff --git a/kivy_garden/mapview/geojson.py b/kivy_garden/mapview/geojson.py index 715b185..c99667a 100644 --- a/kivy_garden/mapview/geojson.py +++ b/kivy_garden/mapview/geojson.py @@ -27,9 +27,9 @@ from kivy.graphics.tesselator import Tesselator, WINDING_ODD, TYPE_POLYGONS from kivy.utils import get_color_from_hex from kivy.metrics import dp -from mapview import CACHE_DIR -from mapview.view import MapLayer -from mapview.downloader import Downloader +from kivy_garden.mapview import CACHE_DIR +from kivy_garden.mapview.view import MapLayer +from kivy_garden.mapview.downloader import Downloader COLORS = { 'aliceblue': '#f0f8ff', diff --git a/kivy_garden/mapview/mbtsource.py b/kivy_garden/mapview/mbtsource.py index 7c771bc..4d8eabb 100644 --- a/kivy_garden/mapview/mbtsource.py +++ b/kivy_garden/mapview/mbtsource.py @@ -10,8 +10,8 @@ __all__ = ["MBTilesMapSource"] -from mapview.source import MapSource -from mapview.downloader import Downloader +from kivy_garden.mapview.source import MapSource +from kivy_garden.mapview.downloader import Downloader from kivy.core.image import Image as CoreImage, ImageLoader import threading import sqlite3 From 1b6442e736f2537e483538106e706e16c7ef1b69 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 02:36:17 +0200 Subject: [PATCH 06/10] Install dev dependencies from setup.py --- requirements.txt | 3 --- setup.py | 2 +- tox.ini | 12 ++---------- 3 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 09ae8ff..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -Kivy-Garden==0.1.1 -futures==2.1.6 -requests==1.2.3 diff --git a/setup.py b/setup.py index b009ea9..88e1a67 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ packages=find_namespace_packages(include=['kivy_garden.*']), install_requires=[], extras_require={ - 'dev': ['pytest>=3.6', 'pytest-cov', 'pytest-asyncio', + 'dev': ['pytest>=3.6', 'pytest-cov', 'pytest-asyncio', 'flake8', 'sphinx_rtd_theme'], 'ci': ['coveralls', 'pycodestyle'], }, diff --git a/tox.ini b/tox.ini index 32080d9..856acb4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,10 @@ [tox] envlist = pep8,py36 -skipsdist = True -# trick to enable pre-installation of Cython -# https://stackoverflow.com/a/50081741/185510 -indexserver = - preinstall = https://pypi.python.org/simple [testenv] passenv = DISPLAY XDG_RUNTIME_DIR HOME -deps = - :preinstall: Cython==0.28.2 - -r{toxinidir}/requirements.txt - kivy - pytest +deps = kivy +extras = dev commands = pytest tests/ From 74bdc7481ccd5aad31502d0e48b9d7af40f9ab35 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 02:47:54 +0200 Subject: [PATCH 07/10] Duplicated license refs 47b6471 --- LICENSE | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e0c7bf2..0000000 --- a/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Mathieu Virbel - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. From edcc9bf8ed0b2cb3d2c291b961ecd1e40b22be10 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 02:48:41 +0200 Subject: [PATCH 08/10] Automatic PyPI deployment on tag --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index d2b04cd..69b0f5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,14 @@ install: script: - docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix mapview-linux /bin/sh -c 'tox' + +# Deploy to PyPI using token set in `PYPI_PASSWORD` environment variable +# https://pypi.org/manage/account/token/ +# https://travis-ci.com/github/kivy-garden/mapview/settings +deploy: + provider: pypi + distributions: sdist bdist_wheel + user: "__token__" + on: + tags: true + repo: kivy-garden/mapview From 278b35cfda7b11c87c1583ca88ae42551b749aa9 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 02:57:15 +0200 Subject: [PATCH 09/10] Publish under both kivy-garden.mapview and mapview --- README.md | 6 ++---- setup.py | 11 ++++++++++- setup_meta.py | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 setup_meta.py diff --git a/README.md b/README.md index 58a20b1..c12980a 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,8 @@ otherwise you'll have an issue when importing `urllib3` from `requests`. # Install -Install the mapview garden module using the `garden` tool: - ``` -garden install mapview +pip install mapview ``` # Usage @@ -54,7 +52,7 @@ This widget can be either used within Python or Kv. That's said, not everything can be done in Kv, to prevent too much computing. ```python -from kivy.garden.mapview import MapView +from kivy_garden.mapview import MapView from kivy.app import App class MapViewApp(App): diff --git a/setup.py b/setup.py index 88e1a67..7a2fbf0 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ URL = 'https://github.com/kivy-garden/mapview' -setup( +setup_params = dict( name='kivy_garden.mapview', version=__version__, description='A kivy garden mapview demo.', @@ -54,3 +54,12 @@ 'Source': URL, }, ) + + +def run_setup(): + setup(**setup_params) + + +# makes sure the setup doesn't run at import time +if __name__ == "__main__": + run_setup() diff --git a/setup_meta.py b/setup_meta.py new file mode 100644 index 0000000..62eea95 --- /dev/null +++ b/setup_meta.py @@ -0,0 +1,14 @@ +""" +Creates a distribution alias that just installs kivy_garden.mapview. +""" +from setuptools import setup + +from setup import setup_params + +setup_params.update({ + 'install_requires': ['kivy_garden.mapview'], + 'name': 'mapview', +}) + + +setup(**setup_params) From 02ef4d9616e7b819cb80a6a0b994629bde5e3781 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 19 Apr 2020 03:09:07 +0200 Subject: [PATCH 10/10] 1.0.1 --- CHANGELOG | 4 ---- CHANGELOG.md | 9 +++++++++ kivy_garden/mapview/_version.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 CHANGELOG create mode 100644 CHANGELOG.md diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index f3854b0..0000000 --- a/CHANGELOG +++ /dev/null @@ -1,4 +0,0 @@ -v0.1.0 Initial release -====================== - -Added the demo flower project. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..755a087 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + +## [1.0.1] + + - Migrate to kivy-garden/mapview + +## [1.0.0] + + - Initial release diff --git a/kivy_garden/mapview/_version.py b/kivy_garden/mapview/_version.py index 899e700..cd7ca49 100644 --- a/kivy_garden/mapview/_version.py +++ b/kivy_garden/mapview/_version.py @@ -1 +1 @@ -__version__ = '1.0.0.dev0' +__version__ = '1.0.1'