setuptools-generate

Generate shell completions and man page when building a python package.

https://github.com/freed-wu/setuptools-generate

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.1%) to scientific vocabulary

Keywords

build generate man python setuptools shell-completion
Last synced: 6 months ago · JSON representation ·

Repository

Generate shell completions and man page when building a python package.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 6
Topics
build generate man python setuptools shell-completion
Created about 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Funding License Citation

README.md

setuptools-generate

pre-commit.ci status github/workflow codecov readthedocs

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

pypi/status pypi/v pypi/downloads pypi/format pypi/implementation pypi/pyversions

Generate shell completions and man page when building a python package.

Usage

Add this package to your build requires:

```toml [build-system] requires = [ "setuptools-generate >= 0.0.6",] build-backend = "setuptools.build_meta"

[project] name = "demo" version = "0.0.1"

[project.scripts] demo = "demo:main"

[tool.setuptools.data-files] "share/application" = [ "assets/desktop/demo.desktop",] "share/icons/hicolor/256x256/apps" = [ "src/demo/assets/images/demo.png",] "share/man/man1" = [ "sdist/demo.1",] "share/bash-completion/completions" = [ "sdist/demo",] "share/zsh/site-functions" = [ "sdist/_demo",] ```

Build your package:

sh python -m build

console $ tree sdist  sdist ├──  _demo # zsh completion script ├──  demo # bash completion script ├──  demo.1 # man page └──  demo.fish # fish completion script $ tree dist  dist ├──  demo-0.0.1-py3-none-any.whl # wheel file └──  demo-0.0.1.tar.gz # source distribution file

You got them.

Now pip install --prefix=/the/root/of/usr dist/*.whl, you will see:

sh $ tree /the/root/of/usr  /the/root/of/usr ├──  bin │ └──  trans ├──  lib │ └──  python3.10 │ └──  site-packages │ ├──  foo │ │ └── ... │ └──  foo-0.0.1.dist-info │ └── ... └──  share ~ ├──  application ~ │ └──  foo.desktop ~ ├──  bash-completion ~ │ └──  completions ~ │ └──  foo ~ ├──  icons ~ │ └──  hicolor ~ │ └──  256x256 ~ │ └──  apps ~ │ └──  foo.png ~ ├──  man ~ │ └──  man1 ~ │ └──  foo.1 ~ └──  zsh ~ └──  site-functions ~ └──  _foo

For linux package (deb, rpm, pkg.zst, ...), it will be very easy.

Example projects:

See document to know more.

Owner

  • Name: wzy
  • Login: Freed-Wu
  • Kind: user
  • Location: $HOME
  • Company: @ustc-ivclab

An adherent of hacker culture and open source.

Citation (CITATION.cff)

---
cff-version: 1.2.0
message: If you use this software, please cite it as below.
authors:
  - family-names: Wu
    given-names: Zhenyu
    orcid: https://orcid.org/0000-0001-6478-9993
title: "setuptools-generate: Generate shell completions and man page when building a python package."
date-released: 2022-12-03
url: "https://github.com/Freed-Wu/setuptools-generate"

GitHub Events

Total
  • Push event: 66
Last Year
  • Push event: 66

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 28
  • Total Committers: 1
  • Avg Commits per committer: 28.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Wu Zhenyu w****u@u****u 28
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 1
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.5
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dbarnett (1)
Pull Request Authors
  • pre-commit-ci[bot] (1)
  • renovate[bot] (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,581 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
pypi.org: setuptools-generate

Generate shell completions and man page when building a python package.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,581 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 10.0%
Average: 23.4%
Forks count: 30.5%
Dependent repos count: 30.6%
Stargazers count: 39.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/main.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • softprops/action-gh-release v1 composite
docs/requirements.txt pypi
  • myst-parser *
  • sphinxcontrib-eval *
  • tomli *
requirements/dev.txt pypi
  • pre-commit * development
  • pytest-cov * development
  • tomli * development
requirements.txt pypi
  • click *
  • help2man *
  • setuptools *
  • shtab *
  • tomli >=1.0.0