diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2022-05-20 22:13:49 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2022-05-20 22:13:49 +0200 |
commit | 1fa6e3c1f81a312c8f652e8ef446dbdd3f72c36c (patch) | |
tree | f296ffd56164aba839f8782c0095f8d9b6584f59 | |
parent | 992dfe4620bbda3316b54c53b63236f3159aa5f9 (diff) | |
download | psutil-1fa6e3c1f81a312c8f652e8ef446dbdd3f72c36c.tar.gz |
remove tidelift.py script
-rw-r--r-- | MANIFEST.in | 1 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | scripts/internal/tidelift.py | 43 |
3 files changed, 0 insertions, 48 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 1816eb5f..c9cd85e9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -147,7 +147,6 @@ include scripts/internal/print_hashes.py include scripts/internal/print_timeline.py include scripts/internal/print_wheels.py include scripts/internal/purge_installation.py -include scripts/internal/tidelift.py include scripts/internal/winmake.py include scripts/iotop.py include scripts/killall.py @@ -270,9 +270,6 @@ check-sdist: ## Create source distribution and checks its sanity (MANIFEST) build/venv/bin/python -m pip install -v --isolated --quiet dist/*.tar.gz build/venv/bin/python -c "import os; os.chdir('build/venv'); import psutil" -tidelift-relnotes: ## upload release notes from HISTORY - $(PYTHON) scripts/internal/tidelift.py - pre-release: ## Check if we're ready to produce a new release. ${MAKE} check-sdist ${MAKE} install @@ -296,7 +293,6 @@ release: ## Create a release (down/uploads tar.gz, wheels, git tag release). $(PYTHON) -c "import subprocess, sys; out = subprocess.check_output('git diff --quiet && git diff --cached --quiet', shell=True).strip(); sys.exit('there are uncommitted changes:\n%s' % out) if out else 0 ;" $(PYTHON) -m twine upload dist/* # upload tar.gz and Windows wheels on PyPI ${MAKE} git-tag-release - ${MAKE} tidelift-relnotes check-manifest: ## Inspect MANIFEST.in file. $(PYTHON) -m check_manifest -v $(ARGS) diff --git a/scripts/internal/tidelift.py b/scripts/internal/tidelift.py deleted file mode 100755 index 9470fc85..00000000 --- a/scripts/internal/tidelift.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2009 Giampaolo Rodola'. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -Update news entry of Tidelift with latest HISTORY.rst section. -Put your Tidelift API token in a file first: -~/.tidelift.token -""" - -from __future__ import print_function - -import os - -import requests - -import psutil -from psutil.tests import import_module_by_path - - -def upload_relnotes(package, version, text, token): - url = "https://api.tidelift.com/external-api/" + \ - "lifting/pypi/%s/release-notes/%s" % (package, version) - res = requests.put( - url=url, - data=text.encode('utf8'), - headers={"Authorization": "Bearer: %s" % token}) - print(version, res.status_code, res.text) - res.raise_for_status() - - -def main(): - here = os.path.abspath(os.path.dirname(__file__)) - path = os.path.join(here, "print_announce.py") - get_changes = import_module_by_path(path).get_changes - with open(os.path.expanduser("~/.tidelift.token")) as f: - token = f.read().strip() - upload_relnotes('psutil', psutil.__version__, get_changes(), token) - - -if __name__ == "__main__": - main() |