GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fcurella/python-packager: A command-line tool to create Python Packages.

BranchesTags
Open more actions menu

Latest commit

 

History

74 Commits
74 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
docs
docs
 
 
pypackager
pypackager
 
 
tests
tests
 
 
.bumpversion.cfg
.bumpversion.cfg
 
 
.env
.env
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
AUTHORS
AUTHORS
 
 
CLASSIFIERS
CLASSIFIERS
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.rst
README.rst
 
 
REQUIREMENTS
REQUIREMENTS
 
 
TEST-REQUIREMENTS
TEST-REQUIREMENTS
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

Python Packager

https://travis-ci.org/fcurella/python-packager.svg?branch=master

A command-line tool to create Python Packages.

It's intended as a quick way to create new Python packages. It is not a maintenance tool.

Usage:

$ pip install python-packager
$ pypackager create <mypackage> [options]

This will create a package in your current directory, complete with setup.py, AUTHORS and LICENSE files.

License files are generated by lice.

Options

All options can be specified on the command-line. Templates can override this settings by including a file called .package.cfg and users can override everything by creating a config file at ~/.pypackager/pypackager.cfg.

Storing options

To store your options (so you don't have to type them every time) you can write them into a file called ~/.pypackager/pypackager.cfg:

[author]
name = John Smith
email = [email protected]

[license]
type = bsd3
organization = John Smith

[scripts]
prerender = ~/.pypackager/my_prerender_script.sh
postrender = ~/.pypackager/my_postrender_script.sh

Creating new packages from a template

To create a new package:

$ pypackager create <mypackage> [options]

Options for create

--author

(alias of --author-name)

--author-name

Required. The author's full name

--author-email

Required. The author's email.

--force

Deletes and recreate the package dir if it's already existing.

--license

(alias of --license-type)

--license-type

Required. The license to include in the code. See lice for a list of the available licenses.

--license-organization

Required. The organization licensing the code. Most of the time this will be the same as --author-name

--template

Optional. The template to use. Can be a directory on the filesystem, a URL pointing to a zip or tarball archive, or the name of an installed template. By default is uses the python-package template shipped with Python Packager.

The rendering context will contain every setting specified, plus a package_name variable containing the package name.

Any directory called {{package_name}} will be renamed to the package's name.

--template-syntax

Optional. The language used to render the templates. Options currently available are pystache and jinja2. Defaults to pystache

--script

(alias of --script-prerender)

--script-prerender

Optional. If enabled, the specified script will be called before files are rendered from the skeleton. A typical example is a script creating a virtualenv.

--script-postrender

Optional. If enabled, the specified script will be called after files are rendered from the skeleton. A typical example is a script initializing a new VCS repository.

Managing templates

You can list, search and download templates from a 'template channel'.

The following commands are available:

$ pypackager list
$ pypackager search <text>
$ pypackager add <package_name> [<url>]
$ pypackager installed
$ pypackager remove <package_name>

Commands

list

Lists all templates available on the index.

search

Lists available templates on the index whose name contains the specified text.

add

Downloads the specified template to your ~/.pypackager/ directory.

If a URL is specified, downloads the template from there instead of using the index.

installed

Lists templates that have already been downloaded.

remove

Deletes the specified template from your ~/.pypackager/ directory.

Options

--index

Optional. Specifies an alternative index to use.

Status

This software should be considered Alpha.

License

This project is released under the MIT License.

About

A command-line tool to create Python Packages.

Resources

Readme
MIT license
Activity

Stars

45 stars

Watchers

5 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.