Skip to content

Commit

Permalink
Use common templates for boto3-stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Dec 26, 2024
1 parent e7224c6 commit c503619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 120 deletions.
57 changes: 1 addition & 56 deletions mypy_boto3_builder/templates/boto3-stubs-full/setup.py.jinja2
Original file line number Diff line number Diff line change
@@ -1,56 +1 @@
"""
Setup script for {{ package.pypi_name }}.

{{ copyright }}
"""
from pathlib import Path

from setuptools import setup # type: ignore


LONG_DESCRIPTION = (Path(__file__).parent / "README.md").read_text()


setup(
name="{{ package.pypi_name }}",
version="{{ package.version }}",
packages=[
{% for service_name in package.service_names -%}
"{{ package.data.get_service_package_name(service_name) }}",
{% endfor -%}
],
url="{{ builder_repo_url }}",
license="MIT License",
author="Vlad Emelianov",
author_email="vlad.emelianov.nz@gmail.com",
description="All-in-one type annotations for {{ package.library_name }} {{ package.library_version }} generated with {{ builder_package_name }} {{ builder_version }}",
classifiers=[

{% for classifier in package.get_classifiers() -%}
{{ "\n " -}}"{{ classifier -}}",
{%- endfor %}
],
keywords='{{ package.library_name }} {{ package.library_name }}-stubs type-annotations typeshed autocomplete',
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
package_data={
{% for service_name in package.service_names -%}
"{{ package.data.get_service_package_name(service_name) }}": ["py.typed", "*.pyi", "*/*.pyi"],
{% endfor -%}
},
python_requires='>={{ package.min_python_version }}',
project_urls={
'Documentation': '{{ package.get_local_doc_link() }}',
'Source': '{{ builder_repo_url }}',
'Tracker': '{{ builder_repo_url }}/issues',
},
install_requires=[
"botocore-stubs",
"types-s3transfer",
"typing-extensions>=4.1.0; python_version<\"3.12\"",
],
extras_require={
"{{ package.library_name }}": ["{{ package.library_name }}=={{ package.library_version }}", "botocore=={{ package.botocore_version }}"],
},
zip_safe=False,
)
{% include "common/wrapper/setup.py.jinja2" with context %}
65 changes: 1 addition & 64 deletions mypy_boto3_builder/templates/boto3-stubs/setup.py.jinja2
Original file line number Diff line number Diff line change
@@ -1,64 +1 @@
"""
Setup script for {{ package.pypi_name }}.

{{ copyright }}
"""
from pathlib import Path

from setuptools import setup # type: ignore


LONG_DESCRIPTION = (Path(__file__).parent / "README.md").read_text()


setup(
name="{{ package.pypi_name }}",
version="{{ package.version }}",
packages=["{{ package.name }}"],
url="{{ builder_repo_url }}",
license="MIT License",
author="Vlad Emelianov",
author_email="vlad.emelianov.nz@gmail.com",
description="Type annotations for {{ package.library_name }} {{ package.library_version }} generated with {{ builder_package_name }} {{ builder_version }}",
classifiers=[

{% for classifier in package.get_classifiers() -%}
{{ "\n " -}}"{{ classifier -}}",
{%- endfor %}
],
keywords='{{ package.library_name }} {{ package.library_name }}-stubs type-annotations typeshed autocomplete',
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
package_data={"{{ package.name }}": ["py.typed", "*.pyi", "*/*.pyi"]},
python_requires='>={{ package.min_python_version }}',
project_urls={
'Documentation': '{{ package.get_local_doc_link() }}',
'Source': '{{ builder_repo_url }}',
'Tracker': '{{ builder_repo_url }}/issues',
},
install_requires=[
"botocore-stubs",
"types-s3transfer",
"typing-extensions>=4.1.0; python_version<\"3.12\"",
],
extras_require={
"full": [
"{{ package.data.pypi_full_name }}",
],
"all": [
{% for service_name in package.service_names -%}
"{{ package.data.get_service_pypi_name(service_name) }}>={{ package.min_library_version }}, <{{ package.max_library_version }}",
{% endfor -%}
],
"essential": [
{% for service_name in package.essential_service_names -%}
"{{ package.data.get_service_pypi_name(service_name) }}>={{ package.min_library_version }}, <{{ package.max_library_version }}",
{% endfor -%}
],
"{{ package.library_name }}": ["{{ package.library_name }}=={{ package.library_version }}", "botocore=={{ package.botocore_version }}"],
{% for service_name in package.service_names -%}
"{{ service_name.extras_name }}": ["{{ package.data.get_service_pypi_name(service_name) }}>={{ package.min_library_version }}, <{{ package.max_library_version }}"],
{% endfor -%}
},
zip_safe=False,
)
{% include "common/wrapper/setup.py.jinja2" with context %}

0 comments on commit c503619

Please sign in to comment.