__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/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.
"""Prints release announce based on HISTORY.rst file content.
See: https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode.
"""
import os
import re
import subprocess
import sys
from psutil import __version__
HERE = os.path.abspath(os.path.dirname(__file__))
ROOT = os.path.realpath(os.path.join(HERE, '..', '..'))
HISTORY = os.path.join(ROOT, 'HISTORY.rst')
PRINT_HASHES_SCRIPT = os.path.join(
ROOT, 'scripts', 'internal', 'print_hashes.py'
)
PRJ_NAME = 'psutil'
PRJ_VERSION = __version__
PRJ_URL_HOME = 'https://github.com/giampaolo/psutil'
PRJ_URL_DOC = 'http://psutil.readthedocs.io'
PRJ_URL_DOWNLOAD = 'https://pypi.org/project/psutil/#files'
PRJ_URL_WHATSNEW = (
'https://github.com/giampaolo/psutil/blob/master/HISTORY.rst'
)
template = """\
Hello all,
I'm glad to announce the release of {prj_name} {prj_version}:
{prj_urlhome}
About
=====
psutil (process and system utilities) is a cross-platform library for \
retrieving information on running processes and system utilization (CPU, \
memory, disks, network) in Python. It is useful mainly for system \
monitoring, profiling and limiting process resources and management of \
running processes. It implements many functionalities offered by command \
line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free, \
nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It \
currently supports Linux, Windows, macOS, Sun Solaris, FreeBSD, OpenBSD, \
NetBSD and AIX, both 32-bit and 64-bit architectures. Supported Python \
versions are 2.7 and 3.6+. PyPy is also known to work.
What's new
==========
{changes}
Links
=====
- Home page: {prj_urlhome}
- Download: {prj_urldownload}
- Documentation: {prj_urldoc}
- What's new: {prj_urlwhatsnew}
Hashes
======
{hashes}
--
Giampaolo - https://gmpy.dev/about
"""
def get_changes():
"""Get the most recent changes for this release by parsing
HISTORY.rst file.
"""
with open(HISTORY) as f:
lines = f.readlines()
block = []
# eliminate the part preceding the first block
for line in lines:
line = lines.pop(0)
if line.startswith('===='):
break
lines.pop(0)
for line in lines:
line = lines.pop(0)
line = line.rstrip()
if re.match(r"^- \d+_", line):
line = re.sub(r"^- (\d+)_", r"- #\1", line)
if line.startswith('===='):
break
block.append(line)
# eliminate bottom empty lines
block.pop(-1)
while not block[-1]:
block.pop(-1)
return "\n".join(block)
def main():
changes = get_changes()
hashes = (
subprocess.check_output([sys.executable, PRINT_HASHES_SCRIPT, 'dist/'])
.strip()
.decode()
)
text = template.format(
prj_name=PRJ_NAME,
prj_version=PRJ_VERSION,
prj_urlhome=PRJ_URL_HOME,
prj_urldownload=PRJ_URL_DOWNLOAD,
prj_urldoc=PRJ_URL_DOC,
prj_urlwhatsnew=PRJ_URL_WHATSNEW,
changes=changes,
hashes=hashes,
)
print(text)
if __name__ == '__main__':
main()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| README | File | 105 B | 0644 |
|
| appveyor_run_with_compiler.cmd | File | 3.29 KB | 0644 |
|
| bench_oneshot.py | File | 3.26 KB | 0755 |
|
| bench_oneshot_2.py | File | 1.06 KB | 0755 |
|
| check_broken_links.py | File | 7.85 KB | 0755 |
|
| clinter.py | File | 2.26 KB | 0755 |
|
| convert_readme.py | File | 1.46 KB | 0755 |
|
| download_wheels_appveyor.py | File | 3.49 KB | 0755 |
|
| download_wheels_github.py | File | 2.95 KB | 0755 |
|
| generate_manifest.py | File | 884 B | 0755 |
|
| git_pre_commit.py | File | 4.54 KB | 0755 |
|
| print_access_denied.py | File | 3.21 KB | 0755 |
|
| print_announce.py | File | 3.22 KB | 0755 |
|
| print_api_speed.py | File | 6.56 KB | 0755 |
|
| print_dist.py | File | 3.58 KB | 0755 |
|
| print_downloads.py | File | 3.98 KB | 0755 |
|
| print_hashes.py | File | 1.1 KB | 0755 |
|
| print_timeline.py | File | 1.39 KB | 0755 |
|
| purge_installation.py | File | 1 KB | 0755 |
|
| winmake.py | File | 17.05 KB | 0755 |
|