Skip to content

Commit

Permalink
switch to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
gmweaver committed Jun 6, 2024
1 parent 9f4d708 commit 08de6da
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13, macos-latest]
cibw_build: ["cp39-* cp310-* cp311-*"]

steps:
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.IN

This file was deleted.

27 changes: 27 additions & 0 deletions build_libpypostal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from typing import Any, Dict

from setuptools import Extension
from setuptools.command import build_ext


def build(setup_kwargs: Dict[str, Any]) -> None:
"""Project build definition"""

ext_modules = [
Extension(
"libpypostal._parser",
sources=["src/pyparser.c", "src/pyutils.c"],
libraries=["postal"],
include_dirs=["/usr/local/include", "src/"],
library_dirs=["/usr/local/lib"],
extra_compile_args=["-std=c99"],
),
]

setup_kwargs.update(
{
"ext_modules": ext_modules,
"cmd_class": {"build_ext": build_ext},
"zip_safe": False,
}
)
35 changes: 0 additions & 35 deletions install_libpostal.sh

This file was deleted.

4 changes: 2 additions & 2 deletions libpypostal/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LibpostalAddressComponent(str, Enum):


def _parse_address(
address: str, language: str, country_code: str
address: str, language: Optional[str] = None, country_code: Optional[str] = None
) -> List[Tuple[str, str]]:
from libpypostal import _parser # type: ignore # pylint: disable=no-name-in-module,import-outside-toplevel

Expand All @@ -49,7 +49,7 @@ def parse_address(
country_code: optional country code to help localize parsing.
Returns:
Dictionary of address components with format {<address component>: parsed value}.
Dictionary of address components with format {<address component>: [parsed_values]}.
Generally, address component lists will only have one element, but there is a
possibility of multiple matches. Address components not found in the input are
set to empty lists.
Expand Down
281 changes: 281 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 08de6da

Please sign in to comment.