-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for urls present in requires_dist (#1728)
* Add check for git urls in requires_dist * Update check for direct references and add error message. * Put package distribution checks in separate script * Temp. disable tests to check package is valid first * Remove test job * Reformat cpu-ci * Put docs back in requries_dist to check validation fails * Add missing colons for error message * Remove docs from extras_require Co-authored-by: Karl Higley <kmhigley@gmail.com>
- Loading branch information
1 parent
f8df0d9
commit 985510e
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
__root="$(cd "$(dirname "${__dir}")" && pwd)" | ||
|
||
pip install pkginfo twine | ||
|
||
pkginfo -f requires_dist ${__root}/dist/*.whl | grep "@" | ||
|
||
if [ $? -eq 0 ]; then | ||
cat <<EOF | ||
::error::Found direct reference(s) in package requires_dist. Please use only normal version specifiers. | ||
See https://peps.python.org/pep-0440/#direct-references for more details. | ||
EOF | ||
exit 1 | ||
fi | ||
|
||
twine check ${__root}/dist/* |