Python helpers and utilities with no dependencies
Project description
NoDeps
Features
Automatic installation of packages
PipMetaPathFinder is a sys.meta_path finder that automatically installs packages when they are imported.
Task dependencies
venvrunswriteandrequirementsbuildrunsvenv,completions,docsandclean.testsrunsbuild,ruff,pytestandtoxpublishrunstests,commit,tag,push,twineandclean
Completions
To install completions after a package is installed:
p completions [name] or completions [name]
Repos
To synchronize (push or pull) all repos under ~/Archive and $HOME run: repos --sync or p repos --sync
pyproject.toml
Project
Project section information in pyproject.toml is automatically updated when Project.write() is called, is key is not in project.
An empty pyproject.toml is needed.
Extras
To use all extras from nodeps to your project, add the following to your pyproject.toml:
[project.optional-dependencies]
dev = [
"nodeps[dev]",
]
docs conf.py and requirements.txt
doc conf.py, reference.md and requirements.txt are automatically updated when Project.write() is called.
usage.md requires a click instance in __main__.py:
<app_name>_click = typer.main.get_command(<Typer instance>)
# Usage
```{eval-rst}
.. click:: pdf.__main__:<app_name>_click
:prog: reembolsos
:nested: full
Makefile
brew:
@p $@
browser:
@$@
.PHONY: build
build: # run: write, docs, clean and venv (requirements)
@$@
builds: # run: write, docs, clean and venv (requirements)
@$@
clean:
@$@
commit: tests
@$@
completions:
@$@
coverage:
@p $@
.PHONY: docs
docs:
@$@
latest:
@$@
next:
@$@
nodeps:
@python3 -m pip install --upgrade -q $@[all,dev]
publish: # runs: docs, tests (build (clean, venv (requirements)), pytest, ruff & tox), commit, tag, push, twine & clean
@$@
pyenv:
@pyenv install 3.11
@pyenv install 3.12-dev
pytest:
@p $@
pytests:
@$@
requirement:
@$@ --install
requirements:
@$@
ruff:
@p $@
secrets:
@$@
test:
@p $@
.PHONY: tests
tests: # runs: build (clean, venv (requirements)), pytest, ruff and tox
@$@
tox:
@p $@
twine:
@p $@
.PHONY: venv
venv: # runs: requirements
@$@
venvs: # runs: requirements
@$@
write:
@p $@
.DEFAULT_GOAL := publish
Extras:
ansi: forgetstdoutandstripfunction usingstrip-ansilibrarycli: fortyperto have CLI forpcommandecho: forechopackage usingclicklibrarylog: forloggerfunction usinglogurulibrarypickle: forcachefunction usingjsonpickleandstructloglibrariespth: forPTHBuildPy,PTHDevelop,PTHEasyInstallandPTHInstallLibclasses usingsetuptoolslibrarypretty: forrichlibrary install andicecream.icconfigurationrepo: forRepoclass usinggitpythonlibraryrequests: forpython_latest,python_versionsandrequest_x_api_key_jsonfunctions that use therequestsandbeautifulsoup4libraries
Test imports uninstalling: pip uninstall loguru beautifulsoup4 click jsonpickle strip_ansi structlog typer
PTH
Add to your setup.cfg and <mypackage>.pth file in your package.
[options]
cmdclass =
build_py = nodeps.PTHBuildPy
develop = nodeps.PTHDevelop
easy_install = nodeps.PTHEasyInstall
install_lib = nodeps.PTHInstallLib
[options.package_data]
mypackage =
*.pth
Add to your pyproject.toml:
[build-system]
requires = [
"nodeps",
"setuptools >= 68.2.2, <69",
"setuptools_scm >= 8.0.3, <9",
"wheel >= 0.41.2, <1"
]
To verify that nodeps.pth is being installed use:
python -c "import venv; print(venv.CORE_VENV_DEPS)"
Post install
File _post_install.py is automatically executed after pip install with the pip install patch.
Installation
You can install nodeps via pip from PyPI:
$ pip install nodeps
You can install nodeps with extras pip from PyPI:
$ pip install nodeps[repo]
To install all extras but [dev] (not including development extras):
$ pip install nodeps[all]
License
Distributed under the terms of the MIT license, nodeps is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nodeps-0.1.18-py3-none-any.whl.
File metadata
- Download URL: nodeps-0.1.18-py3-none-any.whl
- Upload date:
- Size: 85.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
927e53a5934b39a2cd77ce6510748a850e820ca04118724d6b31bb14060e12af
|
|
| MD5 |
2361253150563104fee7417a30bdf91b
|
|
| BLAKE2b-256 |
1268dc202d2552deaed4b123fd3f3d7db3e4266e21a00f095fd7723269cebd6e
|