summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-03-01 04:12:27 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2019-03-01 04:12:27 +0100
commitd01a9eaa35a8aadf6c519839e987a49d8be2d891 (patch)
tree9d6c90ce6427664c59c603c289d6e1642c30e14b
parentd8659cfa35a0da589cb0a303f0e856c0f0d1b087 (diff)
downloadpsutil-d01a9eaa35a8aadf6c519839e987a49d8be2d891.tar.gz
make pre-release checks/install src dist in a venv
-rw-r--r--MANIFEST.in9
-rw-r--r--Makefile17
-rwxr-xr-xscripts/internal/generate_manifest.py11
3 files changed, 20 insertions, 17 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index ba7978e2..321684c1 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -2,14 +2,14 @@ include .coveragerc
include .git-pre-commit
include .gitignore
include CREDITS
-include DEVGUIDE.rst
include HISTORY.rst
-include IDEAS
include INSTALL.rst
include LICENSE
include MANIFEST.in
include Makefile
include README.rst
+include docs/DEVGUIDE.rst
+include docs/DEVNOTES
include docs/Makefile
include docs/README
include docs/_static/copybutton.js
@@ -66,6 +66,8 @@ include psutil/arch/solaris/environ.c
include psutil/arch/solaris/environ.h
include psutil/arch/solaris/v10/ifaddrs.c
include psutil/arch/solaris/v10/ifaddrs.h
+include psutil/arch/windows/global.c
+include psutil/arch/windows/global.h
include psutil/arch/windows/inet_ntop.c
include psutil/arch/windows/inet_ntop.h
include psutil/arch/windows/ntextapi.h
@@ -106,9 +108,12 @@ include scripts/internal/bench_oneshot_2.py
include scripts/internal/check_broken_links.py
include scripts/internal/download_exes.py
include scripts/internal/generate_manifest.py
+include scripts/internal/print_access_denied.py
include scripts/internal/print_announce.py
+include scripts/internal/print_api_speed.py
include scripts/internal/print_timeline.py
include scripts/internal/purge_installation.py
+include scripts/internal/scriptutils.py
include scripts/internal/winmake.py
include scripts/iotop.py
include scripts/killall.py
diff --git a/Makefile b/Makefile
index 592cda44..23dc5933 100644
--- a/Makefile
+++ b/Makefile
@@ -184,8 +184,6 @@ install-git-hooks: ## Install GIT pre-commit hook.
# Distribution
# ===================================================================
-# --- create
-
sdist: ## Create tar.gz source distribution.
${MAKE} generate-manifest
$(PYTHON) setup.py sdist
@@ -196,8 +194,6 @@ wheel: ## Generate wheel.
win-download-wheels: ## Download wheels hosted on appveyor.
$(TEST_PREFIX) $(PYTHON) scripts/internal/download_exes.py --user giampaolo --project psutil
-# --- upload
-
upload-src: ## Upload source tarball on https://pypi.org/project/psutil/
${MAKE} sdist
$(PYTHON) setup.py sdist upload
@@ -207,16 +203,17 @@ upload-win-wheels: ## Upload wheels in dist/* directory on PyPI.
# --- others
-check-src-dist: ## Make sure we can install from the (MANIFEST-based) tar.gz
+check-sdist: ## Create source distribution and checks its sanity (MANIFEST)
rm -rf dist
- $(PYTHON) -m virtualenv build/venv
+ ${MAKE} clean
+ $(PYTHON) -m virtualenv --clear --no-wheel --quiet build/venv
PYTHONWARNINGS=all $(PYTHON) setup.py sdist
- build/venv/bin/python -m pip install dist/*.tar.gz
- build/venv/bin/python -c "import psutil"
+ 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"
pre-release: ## Check if we're ready to produce a new release.
- rm -rf dist
- ${MAKE} check-src-dist
+ ${MAKE} check-sdist
+ ${MAKE} install
${MAKE} generate-manifest
git diff MANIFEST.in > /dev/null # ...otherwise 'git diff-index HEAD' will complain
${MAKE} win-download-wheels
diff --git a/scripts/internal/generate_manifest.py b/scripts/internal/generate_manifest.py
index 3511b749..f6cf0eaa 100755
--- a/scripts/internal/generate_manifest.py
+++ b/scripts/internal/generate_manifest.py
@@ -12,8 +12,9 @@ import os
import subprocess
-IGNORED_EXTS = ('.png', '.jpg', '.jpeg')
-IGNORED_FILES = ('.travis.yml', 'appveyor.yml')
+SKIP_EXTS = ('.png', '.jpg', '.jpeg')
+SKIP_FILES = ('.travis.yml', 'appveyor.yml')
+SKIP_PREFIXES = ('.ci/', '.github/')
def sh(cmd):
@@ -24,9 +25,9 @@ def sh(cmd):
def main():
files = sh("git ls-files").split('\n')
for file in files:
- if file.startswith('.ci/') or \
- os.path.splitext(file)[1].lower() in IGNORED_EXTS or \
- file in IGNORED_FILES:
+ if file.startswith(SKIP_PREFIXES) or \
+ os.path.splitext(file)[1].lower() in SKIP_EXTS or \
+ file in SKIP_FILES:
continue
print("include " + file)