<commit_before># Shortcuts for various tasks (UNIX only).
# To use a specific Python version run: "make install PYTHON=python3.3"
# You can set the variables below from the command line.

# Configurable.
PYTHON = python3
ARGS =
TSCRIPT = psutil/tests/runner.py

# Internal.
DEPS = \
	git+https://github.com/PyCQA/autoflake.git@refs/pull/107/head \
	autopep8 \
	check-manifest \
	concurrencytest \
	coverage \
	flake8 \
	flake8-blind-except \
	flake8-bugbear \
	flake8-debugger \
	flake8-print \
	flake8-quotes \
	isort \
	pep8-naming \
	pyperf \
	pypinfo \
	requests \
	setuptools \
	sphinx_rtd_theme \
	twine \
	virtualenv \
	wheel
PY2_DEPS = \
	futures \
	ipaddress \
	mock
DEPS += `$(PYTHON) -c \
	"import sys; print('$(PY2_DEPS)' if sys.version_info[0] == 2 else '')"`
# "python3 setup.py build" can be parallelized on Python >= 3.6.
BUILD_OPTS = `$(PYTHON) -c \
	"import sys, os; \
	py36 = sys.version_info[:2] >= (3, 6); \
	cpus = os.cpu_count() or 1 if py36 else 1; \
	print('--parallel %s' % cpus if cpus > 1 else '')"`
# In not in a virtualenv, add --user options for install commands.
INSTALL_OPTS = `$(PYTHON) -c \
	"import sys; print('' if hasattr(sys, 'real_prefix') or hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix else '--user')"`
TEST_PREFIX = PYTHONWARNINGS=always PSUTIL_DEBUG=1

# if make is invoked with no arg, default to `make help`
.DEFAULT_GOAL := help

# ===================================================================
# Install
# ===================================================================

clean:  ## Remove all build files.
	@rm -rfv `find . -type d -name __pycache__ \
		-o -type f -name \*.bak \
		-o -type f -name \*.orig \
		-o -type f -name \*.pyc \
		-o -type f -name \*.pyd \
		-o -type f -name \*.pyo \
		-o -type f -name \*.rej \
		-o -type f -name \*.so \
		-o -type f -name \*.~ \
		-o -type f -name \*\$testfn`
	@rm -rfv \
		*.core \
		*.egg-info \
		*\@psutil-* \
		.coverage \
		.failed-tests.txt \
		build/ \
		dist/ \
		docs/_build/ \
		htmlcov/

build:  ## Compile (in parallel) without installing.
	@# "build_ext -i" copies compiled *.so files in ./psutil directory in order
	@# to allow "import psutil" when using the interactive interpreter from
	@# within  this directory.
	PYTHONWARNINGS=all $(PYTHON) setup.py build_ext -i $(BUILD_OPTS)

install:  ## Install this package as current user in "edit" mode.
	# make sure setuptools is installed (needed for 'develop' / edit mode)
	$(PYTHON) -c "import setuptools"
	${MAKE} build
	PYTHONWARNINGS=all $(PYTHON) setup.py develop $(INSTALL_OPTS)
	$(PYTHON) -c "import psutil"  # make sure it actually worked

uninstall:  ## Uninstall this package via pip.
	cd ..; $(PYTHON) -m pip uninstall -y -v psutil || true
	$(PYTHON) scripts/internal/purge_installation.py<commit_msg>remove 'import setuptools' from 'make install' as it's unnecessary and slow<commit_after># Shortcuts for various tasks (UNIX only).
# To use a specific Python version run: "make install PYTHON=python3.3"
# You can set the variables below from the command line.

# Configurable.
PYTHON = python3
ARGS =
TSCRIPT = psutil/tests/runner.py

# Internal.
DEPS = \
	git+https://github.com/PyCQA/autoflake.git@refs/pull/107/head \
	autopep8 \
	check-manifest \
	concurrencytest \
	coverage \
	flake8 \
	flake8-blind-except \
	flake8-bugbear \
	flake8-debugger \
	flake8-print \
	flake8-quotes \
	isort \
	pep8-naming \
	pyperf \
	pypinfo \
	requests \
	setuptools \
	sphinx_rtd_theme \
	twine \
	virtualenv \
	wheel
PY2_DEPS = \
	futures \
	ipaddress \
	mock
DEPS += `$(PYTHON) -c \
	"import sys; print('$(PY2_DEPS)' if sys.version_info[0] == 2 else '')"`
# "python3 setup.py build" can be parallelized on Python >= 3.6.
BUILD_OPTS = `$(PYTHON) -c \
	"import sys, os; \
	py36 = sys.version_info[:2] >= (3, 6); \
	cpus = os.cpu_count() or 1 if py36 else 1; \
	print('--parallel %s' % cpus if cpus > 1 else '')"`
# In not in a virtualenv, add --user options for install commands.
INSTALL_OPTS = `$(PYTHON) -c \
	"import sys; print('' if hasattr(sys, 'real_prefix') or hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix else '--user')"`
TEST_PREFIX = PYTHONWARNINGS=always PSUTIL_DEBUG=1

# if make is invoked with no arg, default to `make help`
.DEFAULT_GOAL := help

# ===================================================================
# Install
# ===================================================================

clean:  ## Remove all build files.
	@rm -rfv `find . -type d -name __pycache__ \
		-o -type f -name \*.bak \
		-o -type f -name \*.orig \
		-o -type f -name \*.pyc \
		-o -type f -name \*.pyd \
		-o -type f -name \*.pyo \
		-o -type f -name \*.rej \
		-o -type f -name \*.so \
		-o -type f -name \*.~ \
		-o -type f -name \*\$testfn`
	@rm -rfv \
		*.core \
		*.egg-info \
		*\@psutil-* \
		.coverage \
		.failed-tests.txt \
		build/ \
		dist/ \
		docs/_build/ \
		htmlcov/

build:  ## Compile (in parallel) without installing.
	@# "build_ext -i" copies compiled *.so files in ./psutil directory in order
	@# to allow "import psutil" when using the interactive interpreter from
	@# within  this directory.
	PYTHONWARNINGS=all $(PYTHON) setup.py build_ext -i $(BUILD_OPTS)

install:  ## Install this package as current user in "edit" mode.
	${MAKE} build
	PYTHONWARNINGS=all $(PYTHON) setup.py develop $(INSTALL_OPTS)
	$(PYTHON) -c "import psutil"  # make sure it actually worked

uninstall:  ## Uninstall this package via pip.
	cd ..; $(PYTHON) -m pip uninstall -y -v psutil || true
	$(PYTHON) scripts/internal/purge_installation.py
{'fraction_non_alphanumeric': 0.1884920634920635, 'fraction_numerical': 0.011544011544011544, 'mean_word_length': 3.1411501120238983, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7067006', 'n_tokens_mistral': 2151, 'n_tokens_neox': 2042, 'n_words': 613}