python tool to create skeleton for PyPI package?

Question:

I want to write my first python package that I can upload to PyPi.
My question is is there any tool to initialize the required skeleton for the PyPi package ?
So far I have found instructions here http://peterdowns.com/posts/first-time-with-pypi.html but it requires me to create all the files manually. I come from a Perl background and in Perl I could use following to create skeleton for cpan module.

module-starter --module=Foo::Bar --author="Foo Bar" [email protected]

In ruby I could just do

 bundle gem foo::bar

I am surprised that there isn’t anything similar in python or may be just I couldn’t find it.

Thanks

Asked By: Oberyn Martell

||

Answers:

There is one: cookiecutter-pypackage

By the way, I think you should do it by hand at first so you can have a better understanding about how to creat a python package. When you’re familiar with it, you can use tools to make this task automatically.

Further reading:

Answered By: lord63. j

You can use Pylease, the v0.3 was released just yesterday.

It works pretty simple:

$ mkdir your_project && cd your_project
$ pylease init your_project

This command creates the basic minimal stuff for a Python project:

  • setup.py – with a call to the setuptools setup method, supplying the name and the version of your project
  • setup.cfg – with basic configuration for Pylease
  • your_project/__init__.py – with the __version__ variable defined in the module root

Furthermore you can extend it and customise to fit your needs. For more information see the docs.

Answered By: bagrat

Old topic but I was looking for a recent answer and couldn’t find one, so here is what I found: a skeleton https://github.com/ionelmc/cookiecutter-pylibrary

It uses the tool cookiecutter.io

Answered By: Gwenael C
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.