Skip to content

Commit 71ea4b5

Browse files
committed
Fix version, description and keywords in setup by generate
1 parent 57cffc4 commit 71ea4b5

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

‎generate.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ sed -i 's/if _preload_content/abcdefvrc\n\n if _preload_content/g' ./vrch
1818
sed -i '/abcdefvrc/r patches/cookiejar_extract.py' ./vrchatapi/rest.py
1919
sed -i 's/ abcdefvrc//g' ./vrchatapi/rest.py
2020

21+
# Fix description, keywords, etc...
22+
# Echo to trim whitespace
23+
VERSION=`echo $(cat setup.py | grep "The version of the OpenAPI document" | cut -d ":" -f 2)`
24+
sed -i "s/VERSION = \"1.0.0\"/VERSION = \"$VERSION\"/" ./setup.py
25+
sed -i 's/description="VRChat API Documentation"/description="VRChat API Library for Python"/' ./setup.py
26+
sed -i 's/keywords=\["OpenAPI", "OpenAPI-Generator", "VRChat API Documentation"\]/keywords=["vrchat", "vrchatapi", "vrc"]/' ./setup.py
27+
2128
# Fix long_description error during pypi upload
2229
sed -i 's/.*VRChat API Banner.*/abcdefvrc/g' ./setup.py
2330
sed -i '/abcdefvrc/r README.md' ./setup.py

‎setup.py‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
# Step 1. We begin with creating a Configuration, which contains the username and password for authentication.
3434
import vrchatapi
3535
from vrchatapi.api import authentication_api, users_api
36-
from pprint import pprint
3736
3837
configuration = vrchatapi.Configuration(
3938
username = 'username',
@@ -52,9 +51,9 @@
5251
try:
5352
# Step 3. Calling getCurrentUser on Authentication API logs you in if the user isn't already logged in.
5453
current_user = auth_api.get_current_user()
55-
pprint("Logged in as:", current_user.display_name)
54+
print("Logged in as:", current_user.display_name)
5655
except vrchatapi.ApiException as e:
57-
print("Exception when calling API: %s\n" % e)
56+
print("Exception when calling API: %s\n", e)
5857
```
5958
6059
See [example.py](https://github.com/vrchatapi/vrchatapi-python/blob/main/example.py) for more example usage on getting started.
@@ -74,7 +73,7 @@
7473
from setuptools import setup, find_packages # noqa: H301
7574

7675
NAME = "vrchatapi"
77-
VERSION = "1.0.0"
76+
VERSION = "1.1.2"
7877
# To install the library, run the following
7978
#
8079
# python setup.py install
@@ -90,11 +89,11 @@
9089
setup(
9190
name=NAME,
9291
version=VERSION,
93-
description="VRChat API Documentation",
92+
description="VRChat API Library for Python",
9493
author="Unofficial VRChat API Documentation Project",
9594
author_email="me@ruby.js.org",
9695
url="",
97-
keywords=["OpenAPI", "OpenAPI-Generator", "VRChat API Documentation"],
96+
keywords=["vrchat", "vrchatapi", "vrc"],
9897
python_requires=">=3.6",
9998
install_requires=REQUIRES,
10099
packages=find_packages(exclude=["test", "tests"]),
@@ -134,7 +133,6 @@
134133
# Step 1. We begin with creating a Configuration, which contains the username and password for authentication.
135134
import vrchatapi
136135
from vrchatapi.api import authentication_api, users_api
137-
from pprint import pprint
138136
139137
configuration = vrchatapi.Configuration(
140138
username = 'username',
@@ -153,9 +151,9 @@
153151
try:
154152
# Step 3. Calling getCurrentUser on Authentication API logs you in if the user isn't already logged in.
155153
current_user = auth_api.get_current_user()
156-
pprint("Logged in as:", current_user.display_name)
154+
print("Logged in as:", current_user.display_name)
157155
except vrchatapi.ApiException as e:
158-
print("Exception when calling API: %s\n" % e)
156+
print("Exception when calling API: %s\n", e)
159157
```
160158
161159
See [example.py](https://github.com/vrchatapi/vrchatapi-python/blob/main/example.py) for more example usage on getting started.

0 commit comments

Comments
 (0)