Skip to content

Commit 7cc59e7

Browse files
authored
SWI-4224 (#177)
* SWI-4224 Add `setup.py` custom template * Remove setup.py from the ignore * Add python 3.12
1 parent 7db2931 commit 7cc59e7

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
strategy:
4747
matrix:
4848
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-latest]
49-
python-version: [3.8, 3.9, "3.10", "3.11"]
49+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
5050
env:
5151
PYTHON_VERSION: ${{ matrix.python-version }}
5252
OPERATING_SYSTEM: ${{ matrix.os }}

.openapi-generator-ignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
.gitignore
2626
setup.cfg
27-
setup.py
28-
#*requirements.txt
27+
*requirements.txt
2928
test/*
3029
.github/workflows/python.yml

custom_templates/setup.mustache

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# coding: utf-8
2+
3+
{{>partial_header}}
4+
5+
import os
6+
import sys
7+
from setuptools import setup, find_packages # noqa: H301
8+
9+
NAME = "bandwidth-sdk"
10+
VERSION = os.environ['RELEASE_VERSION']
11+
12+
with open('README.md', 'r', encoding='utf-8') as fh:
13+
long_description = fh.read()
14+
15+
with open('requirements.txt') as f:
16+
REQUIRES = f.read().splitlines()
17+
18+
PYTHON_REQUIRES = ">=3.7"
19+
20+
setup(
21+
name=NAME,
22+
version=VERSION,
23+
description="Bandwidth",
24+
author="Bandwidth",
25+
author_email="[email protected]",
26+
url="https://dev.bandwidth.com/sdks/python",
27+
keywords=["OpenAPI", "OpenAPI-Generator", "Bandwidth"],
28+
python_requires=PYTHON_REQUIRES,
29+
install_requires=REQUIRES,
30+
packages=find_packages(exclude=["test", "tests"]),
31+
include_package_data=True,
32+
long_description=long_description
33+
)

openapi-config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ packageName: bandwidth
33
packageVersion: 15.0.0
44
packageUrl: 'https://dev.bandwidth.com/sdks/python'
55
disallowAdditionalPropertiesIfNotPresent: false
6+
templateDir: custom_templates

0 commit comments

Comments
 (0)