mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
add packaging for the different subprojects
This commit is contained in:
21
packaging/nominatim-api/README.md
Normal file
21
packaging/nominatim-api/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
Nominatim - frontend library
|
||||
=========
|
||||
|
||||
Nominatim is a tool to search OpenStreetMap data
|
||||
by name and address (geocoding) and to generate synthetic addresses of
|
||||
OSM points (reverse geocoding).
|
||||
|
||||
This module implements the library for searching in a Nominatim database
|
||||
imported with the `nominatim-db` package.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
The documentation of the latest development version is in the
|
||||
`docs/` subdirectory. A HTML version can be found at
|
||||
https://nominatim.org/release-docs/develop/ .
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
The source code is available under a GPLv3 license.
|
||||
45
packaging/nominatim-api/pyproject.toml
Normal file
45
packaging/nominatim-api/pyproject.toml
Normal file
@@ -0,0 +1,45 @@
|
||||
[project]
|
||||
name = "nominatim-api"
|
||||
description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Search library."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.7"
|
||||
license = 'GPL-3.0-or-later'
|
||||
maintainers = [
|
||||
{ name = "Sarah Hoffmann", email = "lonvia@denofr.de" }
|
||||
]
|
||||
keywords = [ "geocoding", "OpenStreetMap", "search" ]
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU General Public License (GPL)",
|
||||
"Operating System :: OS Independent",
|
||||
]
|
||||
dependencies = [
|
||||
"nominatim-core",
|
||||
"SQLAlchemy>=1.4.31",
|
||||
"psycopg",
|
||||
"PyICU"
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://nominatim.org"
|
||||
Issues = "https://github.com/osm-search/Nominatim/issues"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "code"
|
||||
path = "../../src/nominatim_api/version.py"
|
||||
expression = "NOMINATIM_API_VERSION"
|
||||
|
||||
[tool.hatch.build.targets.sdist.force-include]
|
||||
"../../src/nominatim_db" = "nominatim_api"
|
||||
|
||||
[tool.hatch.build.targets.sdist.sources]
|
||||
"src/nominatim_core" = "nominatim_api"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["nominatim_api"]
|
||||
|
||||
22
packaging/nominatim-core/README.md
Normal file
22
packaging/nominatim-core/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
Nominatim - Core Package
|
||||
=========
|
||||
|
||||
Nominatim is a tool to search OpenStreetMap data
|
||||
by name and address (geocoding) and to generate synthetic addresses of
|
||||
OSM points (reverse geocoding).
|
||||
|
||||
This is the core pacakage containing resources and code shared by
|
||||
Nominatim's frontend `nominatim_api` and backend `nominatim_db`. You
|
||||
usually don't want to install this package directly.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
The documentation of the latest development version is in the
|
||||
`docs/` subdirectory. A HTML version can be found at
|
||||
https://nominatim.org/release-docs/develop/ .
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
The source code is available under a GPLv2 license.
|
||||
49
packaging/nominatim-core/pyproject.toml
Normal file
49
packaging/nominatim-core/pyproject.toml
Normal file
@@ -0,0 +1,49 @@
|
||||
[project]
|
||||
name = "nominatim-core"
|
||||
description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Base package for common resources for the project."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.7"
|
||||
license = 'GPL-3.0-or-later'
|
||||
maintainers = [
|
||||
{ name = "Sarah Hoffmann", email = "lonvia@denofr.de" }
|
||||
]
|
||||
keywords = [ "geocoding", "OpenStreetMap", "search" ]
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU General Public License (GPL)",
|
||||
"Operating System :: OS Independent",
|
||||
]
|
||||
dependencies = [
|
||||
"python-dotenv",
|
||||
"jinja2",
|
||||
"pyYAML>=5.1",
|
||||
"datrie"
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://nominatim.org"
|
||||
Issues = "https://github.com/osm-search/Nominatim/issues"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "code"
|
||||
path = "../../src/nominatim_core/version.py"
|
||||
expression = "NOMINATIM_CORE_VERSION"
|
||||
|
||||
[tool.hatch.build.targets.sdist.force-include]
|
||||
"../../src/nominatim_core" = "nominatim_core"
|
||||
"../../lib-sql" = "nominatim_core/resources/lib-sql"
|
||||
"../../settings" = "nominatim_core/resources/settings"
|
||||
"../../data/country_osm_grid.sql.gz" = "nominatim_core/resources/country_osm_grid.sql.gz"
|
||||
"../../data/words.sql" = "nominatim_core/resources/words.sql"
|
||||
"src/nominatim_core/paths.py" = "nominatim_core/paths.py"
|
||||
|
||||
[tool.hatch.build.targets.sdist.sources]
|
||||
"src/nominatim_core" = "nominatim_core"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["nominatim_core"]
|
||||
15
packaging/nominatim-core/src/nominatim_core/paths.py
Normal file
15
packaging/nominatim-core/src/nominatim_core/paths.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# This file is part of Nominatim. (https://nominatim.org)
|
||||
#
|
||||
# Copyright (C) 2024 by the Nominatim developer community.
|
||||
# For a full list of authors see the git log.
|
||||
"""
|
||||
Path settings for extra data used by Nominatim.
|
||||
"""
|
||||
from pathlib import Path
|
||||
|
||||
PHPLIB_DIR = None
|
||||
DATA_DIR = (Path(__file__) / '..' / 'resources').resolve()
|
||||
SQLLIB_DIR = (DATA_DIR / 'lib-sql')
|
||||
CONFIG_DIR = (DATA_DIR / 'settings')
|
||||
21
packaging/nominatim-db/README.md
Normal file
21
packaging/nominatim-db/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
Nominatim - DB Backend
|
||||
=========
|
||||
|
||||
Nominatim is a tool to search OpenStreetMap data
|
||||
by name and address (geocoding) and to generate synthetic addresses of
|
||||
OSM points (reverse geocoding).
|
||||
|
||||
This module implements the database backend for Nominatim and the
|
||||
command-line tool for importing and maintaining the database.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
The documentation of the latest development version is in the
|
||||
`docs/` subdirectory. A HTML version can be found at
|
||||
https://nominatim.org/release-docs/develop/ .
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
The source code is available under a GPLv3 license.
|
||||
49
packaging/nominatim-db/pyproject.toml
Normal file
49
packaging/nominatim-db/pyproject.toml
Normal file
@@ -0,0 +1,49 @@
|
||||
[project]
|
||||
name = "nominatim-db"
|
||||
description = "A tool for building a database of OpenStreetMap for geocoding and for searching the database. Database backend."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.7"
|
||||
license = 'GPL-3.0-or-later'
|
||||
maintainers = [
|
||||
{ name = "Sarah Hoffmann", email = "lonvia@denofr.de" }
|
||||
]
|
||||
keywords = [ "geocoding", "OpenStreetMap", "search" ]
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU General Public License (GPL)",
|
||||
"Operating System :: OS Independent",
|
||||
]
|
||||
dependencies = [
|
||||
"nominatim-core",
|
||||
"psycopg2",
|
||||
"psutil",
|
||||
"PyICU"
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://nominatim.org"
|
||||
Issues = "https://github.com/osm-search/Nominatim/issues"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "code"
|
||||
path = "../../src/nominatim_db/version.py"
|
||||
expression = "NOMINATIM_VERSION.release_version()"
|
||||
|
||||
[tool.hatch.build.targets.sdist.force-include]
|
||||
"../../src/nominatim_db" = "nominatim_db"
|
||||
|
||||
[tool.hatch.build.targets.sdist.sources]
|
||||
"src/nominatim_core" = "nominatim_db"
|
||||
"scripts" = "scripts"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["nominatim_db"]
|
||||
|
||||
[tool.hatch.build.targets.wheel.shared-scripts]
|
||||
"scripts" = "/"
|
||||
|
||||
5
packaging/nominatim-db/scripts/nominatim
Executable file
5
packaging/nominatim-db/scripts/nominatim
Executable file
@@ -0,0 +1,5 @@
|
||||
#!python3
|
||||
|
||||
from nominatim_db import cli
|
||||
|
||||
exit(cli.nominatim(module_dir=None, osm2pgsql_path=None))
|
||||
Reference in New Issue
Block a user