Skip to content

Commit

Permalink
feat(python): improve metadata of jsii package (#1587)
Browse files Browse the repository at this point in the history
Add references to the GitHub repository, etc... in order to improve the
detail page experience on https://pypi.org/project/jsii/. Interestingly,
we already produce some of these metadata entries (where relevant) in
the packages generated by `jsii-pacmak` but failed to include those in
the runtime library's package descriptor.
  • Loading branch information
RomainMuller committed Apr 20, 2020
1 parent 1ae4e75 commit 7dd04fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions packages/@jsii/python-runtime/bin/generate
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ with open("src/jsii/_metadata.json", "w") as fp:
{
"version": data["version"],
"description": data["description"],
"license": data["license"],
"author": data["author"]["name"],
"jsii-runtime": {"version": embedded_data["version"]},
"bugs": data["bugs"]["url"],
"homepage": data["homepage"],
"repository": data["repository"]["url"],
},
fp,
indent=2,
)


Expand Down
6 changes: 3 additions & 3 deletions packages/@jsii/python-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"name": "Amazon Web Services",
"url": "https://aws.amazon.com"
},
"homepage": "git://github.com/aws/jsii",
"homepage": "https://github.com/aws/jsii",
"bugs": {
"url": "git://github.com/aws/jsii"
"url": "https://github.com/aws/jsii"
},
"repository": {
"type": "git",
"url": "git://github.com/aws/jsii",
"url": "https://github.com/aws/jsii.git",
"directory": "packages/@jsii/python-runtime"
},
"engines": {
Expand Down
8 changes: 7 additions & 1 deletion packages/@jsii/python-runtime/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
setuptools.setup(
name="jsii",
version=metadata["version"],
license="Apache-2.0",
license=metadata["license"],

url=metadata["homepage"],
project_urls={
"Bug Tracker": metadata["bugs"],
"Source": metadata["repository"],
},

description=metadata["description"],
long_description=long_description,
Expand Down

0 comments on commit 7dd04fe

Please sign in to comment.