diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fb9a3b6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["flit_core >=2,<4"] +build-backend = "flit_core.buildapi" + + +[tool.flit.metadata] +module = "sphinxext_opengraph" +author = "Itay Ziv" +author-email = "itay220204@gmail.com" +home-page = "https://github.com/wpilibsuite/sphinxext-opengraph" +description-file = "README.md" +requires-python = ">=3.6" +requires = ["sphinx >= 2"] + +# [tool.flit.metadata.requires-extra] +# test = [ +# "conftest.py", +# "roots", +# "test_options.py" + +# ] +# doc = [" \ No newline at end of file diff --git a/setup.py b/setup.py index 6541242..beb1053 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/wpilibsuite/sphinxext-opengraph", + license="LICENSE.md", install_requires=["sphinx>=2.0"], packages=["sphinxext/opengraph"], classifiers=[ diff --git a/sphinxext/opengraph/__init__.py b/src/sphinxext_opengraph/__init__.py similarity index 97% rename from sphinxext/opengraph/__init__.py rename to src/sphinxext_opengraph/__init__.py index 9c25885..f867286 100644 --- a/sphinxext/opengraph/__init__.py +++ b/src/sphinxext_opengraph/__init__.py @@ -1,3 +1,5 @@ +"""Sphinx extension to generate OpenGraph metadata (https://ogp.me/)""" + from typing import Any, Dict from urllib.parse import urljoin, urlparse, urlunparse from pathlib import Path, PosixPath @@ -11,6 +13,7 @@ import os +__version__ = "0.4.2" DEFAULT_DESCRIPTION_LENGTH = 200 diff --git a/sphinxext/opengraph/descriptionparser.py b/src/sphinxext_opengraph/descriptionparser.py similarity index 100% rename from sphinxext/opengraph/descriptionparser.py rename to src/sphinxext_opengraph/descriptionparser.py diff --git a/sphinxext/opengraph/titleparser.py b/src/sphinxext_opengraph/titleparser.py similarity index 100% rename from sphinxext/opengraph/titleparser.py rename to src/sphinxext_opengraph/titleparser.py