Skip to content

Revert to setup #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools flit twine
pip install setuptools twine

- name: Set tag version
id: tag
Expand All @@ -94,22 +94,12 @@ jobs:
run: echo ::set-output name=version::$(python setup.py --version)

- name: Build and publish titiler packages
if: steps.tag.outputs.tag == steps.module.outputs.version
env:
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
scripts/publish

- name: Build and publish titiler meta-package
if: steps.tag.outputs.tag == steps.module.outputs.version
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
rm -rf dist
python setup.py sdist
twine upload dist/*
scripts/publish

publish-docker:
needs: [tests]
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 0.6.0a2 (2022-05-11)

* revert to `setup.py` + `setuptools` instead of `pyproject.toml` + `flit` because it broke namespace packages (https://github.com/developmentseed/titiler/pull/472)

## 0.6.0a1 (2022-05-11)

### titiler.core
Expand Down
2 changes: 1 addition & 1 deletion deployment/aws/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM --platform=linux/amd64 lambci/lambda:build-python3.8

WORKDIR /tmp

RUN pip install titiler.application==0.6.0a1 mangum>=0.10.0 -t /asset --no-binary pydantic
RUN pip install titiler.application==0.6.0a2 mangum>=0.10.0 -t /asset --no-binary pydantic

# Reduce package size and remove useless files
RUN cd /asset && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[2-3][0-9]//'); cp $f $n; done;
Expand Down
7 changes: 6 additions & 1 deletion scripts/publish
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ do
echo "publishing titiler-${PACKAGE_DIR}"
pushd ./src/titiler/${PACKAGE_DIR}
rm -rf dist
flit publish --format sdist
python setup.py sdist
twine upload dist/*
popd
done

rm -rf dist
python setup.py sdist
twine upload dist/*
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.6.0a1
current_version = 0.6.0a2
commit = True
tag = True
tag_name = {new_version}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
with open("README.md") as f:
long_description = f.read()

__version__ = "0.6.0a1"
__version__ = "0.6.0a2"

inst_reqs = [
f"titiler.core=={__version__}",
Expand Down
3 changes: 3 additions & 0 deletions src/titiler/application/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include titiler/application/templates/*.html

recursive-exclude tests *
60 changes: 0 additions & 60 deletions src/titiler/application/pyproject.toml

This file was deleted.

2 changes: 2 additions & 0 deletions src/titiler/application/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
version = attr: titiler.application.__version__
46 changes: 46 additions & 0 deletions src/titiler/application/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""Setup titiler.application."""

from setuptools import find_namespace_packages, setup

with open("README.md") as f:
long_description = f.read()

inst_reqs = [
"rio-cogeo>=3.1,<4.0",
"titiler.core>=0.6.0a1,<0.7",
"titiler.mosaic>=0.6.0a1,<0.7",
"starlette-cramjam>=0.1.0,<0.2",
"python-dotenv",
]
extra_reqs = {
"test": ["pytest", "pytest-cov", "pytest-asyncio", "requests", "brotlipy"],
"server": ["uvicorn[standard]>=0.12.0,<0.16.0"],
}


setup(
name="titiler.application",
description="A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL.",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.7",
classifiers=[
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
keywords="COG STAC MosaicJSON FastAPI",
author="Vincent Sarago",
author_email="vincent@developmentseed.org",
url="https://github.com/developmentseed/titiler",
license="MIT",
packages=find_namespace_packages(exclude=["tests*"]),
package_data={"titiler": ["application/templates/*.html"]},
include_package_data=True,
zip_safe=False,
install_requires=inst_reqs,
extras_require=extra_reqs,
)
2 changes: 1 addition & 1 deletion src/titiler/application/titiler/application/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""titiler.application"""

__version__ = "0.6.0a1"
__version__ = "0.6.0a2"
3 changes: 3 additions & 0 deletions src/titiler/core/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include titiler/core/templates/*.xml

recursive-exclude tests *
61 changes: 0 additions & 61 deletions src/titiler/core/pyproject.toml

This file was deleted.

2 changes: 2 additions & 0 deletions src/titiler/core/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
version = attr: titiler.core.__version__
50 changes: 50 additions & 0 deletions src/titiler/core/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"""Setup titiler.core."""

from setuptools import find_namespace_packages, setup

with open("README.md") as f:
long_description = f.read()

inst_reqs = [
"fastapi>=0.73.0",
"geojson-pydantic",
"jinja2>=2.11.2,<4.0.0",
"numpy",
"pydantic",
"rasterio",
"rio-tiler>=3.1,<3.2",
"simplejson",
"importlib_resources>=1.1.0;python_version<'3.9'",
"typing_extensions;python_version<'3.8'",
]
extra_reqs = {
"test": ["pytest", "pytest-cov", "pytest-asyncio", "requests"],
}


setup(
name="titiler.core",
description="A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL.",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.7",
classifiers=[
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
keywords="COG STAC FastAPI",
author="Vincent Sarago",
author_email="vincent@developmentseed.org",
url="https://github.com/developmentseed/titiler",
license="MIT",
packages=find_namespace_packages(exclude=["tests*"]),
package_data={"titiler": ["core/templates/*.xml"]},
include_package_data=True,
zip_safe=False,
install_requires=inst_reqs,
extras_require=extra_reqs,
)
2 changes: 1 addition & 1 deletion src/titiler/core/titiler/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""titiler.core"""

__version__ = "0.6.0a1"
__version__ = "0.6.0a2"

from . import dependencies, errors, factory, routing, utils # noqa
from .factory import ( # noqa
Expand Down
1 change: 1 addition & 0 deletions src/titiler/mosaic/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-exclude tests *
47 changes: 0 additions & 47 deletions src/titiler/mosaic/pyproject.toml

This file was deleted.

2 changes: 2 additions & 0 deletions src/titiler/mosaic/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
version = attr: titiler.mosaic.__version__
Loading