summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2022-05-20 22:13:49 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2022-05-20 22:13:49 +0200
commit1fa6e3c1f81a312c8f652e8ef446dbdd3f72c36c (patch)
treef296ffd56164aba839f8782c0095f8d9b6584f59 /scripts
parent992dfe4620bbda3316b54c53b63236f3159aa5f9 (diff)
downloadpsutil-1fa6e3c1f81a312c8f652e8ef446dbdd3f72c36c.tar.gz
remove tidelift.py script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/internal/tidelift.py43
1 files changed, 0 insertions, 43 deletions
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()