Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b0904f0
add initial contributor and style guide
Nov 24, 2015
41b3e66
Merge pull request #188 from ddbeck/initial_contributor_guide
qwcode Nov 24, 2015
fbfce95
Fix typo in contribute.rst
alexwlchan Nov 24, 2015
d718e6d
Merge pull request #189 from alexwlchan/patch-1
qwcode Nov 24, 2015
cab0a47
created prerequisites.rst
JoshuaAcosta Jan 11, 2016
c4efd75
updated prerequisites.rst
JoshuaAcosta Jan 19, 2016
4d48b34
added links, updated prerequisites
JoshuaAcosta Jan 24, 2016
bd02902
updated prerequisites.rst
JoshuaAcosta Jan 31, 2016
f7512f2
Merge branch 'master' into develop; bringing develop inline with master
Feb 7, 2016
2e1d5aa
Virtualenv tutorial
Jan 5, 2016
9682448
Address review comments
Jan 20, 2016
a237455
create TOC for new packaging tutorials and add to root TOC
Feb 7, 2016
3483ea4
fix pip command in using virtualenv tutorial
Feb 7, 2016
4cc31af
fix style guide inconsistencies in virtualenv tutorial
Feb 7, 2016
38a1458
fix pyvenv/python -m venv inconsistency in virtualenv tutorial
Feb 7, 2016
309404b
escape a literal asterisk in the platform compatibility tag section
Feb 12, 2016
c3bd0c1
add Travis CI configuration file
Feb 12, 2016
b469b2e
virtualenv guide: Fix link
amitsaha Feb 16, 2016
70c7f8b
Change the link to https://virtualenv.pypa.io/en/latest/
amitsaha Feb 18, 2016
ecc1947
Merge pull request #226 from amitsaha/virtualenv_fix
Feb 19, 2016
9e2138a
updated formatting
JoshuaAcosta Mar 2, 2016
f1df9d0
updated code block formatting and wrapped lines at 80 chars
JoshuaAcosta Mar 24, 2016
80aa8a6
updated period/double colon formatting
JoshuaAcosta Apr 2, 2016
67be5cc
Merge branch 'prerequisites' of https://github.com/JoshuaAcosta/pytho…
May 3, 2016
ef471a0
Merge branch 'JoshuaAcosta-prerequisites' into develop
May 3, 2016
1406471
add 'prerequisites' to tutorials ToC
May 3, 2016
ff0a134
Merge branch 'master' into develop
Sep 26, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: python
python:
- "2.7"
install: "pip install Sphinx"
script: "make SPHINXOPTS='-W' html"
156 changes: 156 additions & 0 deletions source/contribute.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
.. |PyPUG| replace:: Python Packaging User Guide

************************
Contribute to this guide
************************

The |PyPUG| welcomes contributors! There are lots of ways to help out,
including:

* Reading the guide and giving feedback
* Reviewing new contributions
* Revising existing content
* Writing new content

Most of the work on the |PyPUG| takes place on the
`project's GitHub repository`__. To get started, check out the list of
`open issues`__ and `pull requests`__. If you're planning to write or edit
the guide, please read the :ref:`style guide <contributing_style_guide>`.

.. __: https://github.com/pypa/python-packaging-user-guide/
.. __: https://github.com/pypa/python-packaging-user-guide/issues
.. __: https://github.com/pypa/python-packaging-user-guide/pulls

By contributing to the |PyPUG|, you're expected to follow the Python
Packaging Authority's `Contributor Code of Conduct`__. Harassment, personal
attacks, and other unprofessional conduct is not acceptable.

.. __: https://www.pypa.io/en/latest/code-of-conduct/


.. _contributing_style_guide:

Style guide
===========

This style guide has recommendations for how you should write the |PyPUG|.
Before you start writing, please review it. By following the style guide, your
contributions will help add to a cohesive whole and make it easier for your
contributions to be accepted into the project.


Purpose
-------

The purpose of the |PyPUG| is

to be the authoritative resource on how to package, publish and install
Python distributions using current tools


Scope
-----

The guide is meant to answer questions and solve problems with accurate and
focused recommendations.

The guide isn't meant to be comprehensive and it's not meant to replace
individual projects' documentation. For example, pip has dozens of commands,
options, and settings. The pip documentation describes each of them in
detail, while this guide describes only the parts of pip that are needed to
complete the specific tasks described in this guide.


Audience
--------

The audience of this guide is anyone who uses Python with packages.

Don't forget that the Python community is big and welcoming. Readers may not
share your age, gender, educational background, cultural background, and
more, but they're just as deserving to learn about packaging as you are.

In particular, keep in mind that not all people who use Python see themselves
as programmers. They might be astronomers or painters or students, not just
professional software developers.


Voice and tone
--------------

When writing this guide, strive to write with a voice that's approachable
and humble, even if you have all the answers.

Imagine you're working on a Python project with someone you know to be smart
and skilled. You like working with them and they like working with you. That
person has asked you a question. How do you respond? *That* is how you
should write this guide.

Here's a quick check: try reading aloud to get a sense for your writing's
voice and tone. Does it sound like something you would say or does it sound
like you're acting out a part of giving a speech? Feel free to use
contractions and don't worry about sticking to fussy grammar rules. You are
hereby granted permission to end a sentence in a preposition.

When writing the guide, adjust your tone for the seriousness and difficulty
of the topic. If you're writing an introductory tutorial, it's OK to make a
joke, but if you're covering a sensitive security recommendation, you might
want to avoid jokes altogether.


Conventions and mechanics
-------------------------

**Write to the reader**
When giving recommendations or steps to take, address the reader as *you*
or use the imperative mood.

| Wrong: To install it, the user runs…
| Right: You can install it by running…
| Right: To install it, run…

**State assumptions**
Avoid making unstated assumptions. Reading on the web means that any page of
the guide may be the first page of the guide that the reader ever sees.
If you're going to make assumptions, then say what assumptions that you're
going to make.

**Cross-reference generously**
The first time you mention a tool or practice, link to the part of the
guide that covers it, or link to a relevant document elsewhere. Save the
reader a search.

**Respect naming practices**
When naming tools, sites, people, and other proper nouns, use their preferred
capitalization.

| Wrong: Pip uses…
| Right: pip uses…
|
| Wrong: …hosted on github.
| Right: …hosted on GitHub.

**Use a gender-neutral style**
Often, you'll address the reader directly with *you*, *your* and *yours*.
Otherwise, use gender-neutral pronouns *they*, *their*, and *theirs* or
avoid pronouns entirely.

| Wrong: A maintainer uploads the file. Then he…
| Right: A maintainer uploads the file. Then they…
| Right: A maintainer uploads the file. Then the maintainer…

**Headings**
Write headings that use words the reader is searching for. A good way to
do this is to have your heading complete an implied question. For example, a
reader might want to know *How do I install MyLibrary?* so a good heading
might be *Install MyLibrary*.

In section headings, use sentence case. In other words, write headings as you
would write a typical sentence.

| Wrong: Things You Should Know About Python
| Right: Things you should know about Python

**Numbers**
In body text, write numbers one through nine as words. For other numbers or
numbers in tables, use numerals.
2 changes: 2 additions & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This guide is maintained on `github
.. toctree::
:maxdepth: 1

packaging_tutorials
current
installing
distributing
Expand All @@ -24,6 +25,7 @@ This guide is maintained on `github
key_projects
glossary
support
contribute


.. _docs.python.org: http://docs.python.org
18 changes: 18 additions & 0 deletions source/packaging_tutorials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=========================
Introduction to Packaging
=========================

:Last Reviewed: Pending

.. note::

This tutorial is a work in progress. Please see `issue #194`__ for details.

.. __: https://github.com/pypa/python-packaging-user-guide/issues/194


.. toctree::
:maxdepth: 1

prerequisites
using-a-virtualenv
106 changes: 106 additions & 0 deletions source/prerequisites.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
Prerequisites for Creating Packages
===================================

In order to complete the following tutorial, you must have pip, setuptools
and wheel installed. The section below describes the steps for installation.
Please note the latest versions of Python include pip.


Install pip, setuptools and wheel
---------------------------------

To install pip, setuptools and wheel, you must have a version of Python
installed. You can verify if there is a version of Python in your
system by entering the following into your terminal or command prompt.

.. code-block:: shell

python --version

If a version number is returned (for example: python 3.5.0), then
Python is installed.

Once you have verified a version of Python is installed in your system,
you may proceed verifying/installing/upgrading pip, setuptools and
wheel in your system.


pip
----

To verify if pip is installed in your system, enter
the following into your command prompt.

.. code-block:: shell

pip --version

If a version number is returned (for example: pip 7.X.X), then
pip is installed.

If pip is not installed, download get-pip.py from here_.

.. _here: https://bootstrap.pypa.io/get-pip.py

After downloading, run the following command in
your prompt as this will install pip.

.. code-block:: shell

python get-pip.py

If pip is installed and needs to be upgraded, enter the following command.

.. code-block:: shell

pip install --upgrade pip


setuptools
-----------

Once you have verified/upgraded pip in your system, you'll need to
verify if you have setuptools installed. To verify, enter the following into
your command prompt and you'll see a list of packages managed by pip.

.. code-block:: shell

pip list

Scroll through the list, which is listed alphabetically, and locate setuptools.

If setuptools is not installed, enter the following into your command prompt.

.. code-block:: shell

pip install setuptools

If setuptools needs to be upgraded, enter the following command.

.. code-block:: shell

pip install --upgrade setuptools


wheel
-----

Similar to setuptools verification, to verify if wheel
is installed, enter the following and locate wheel.

.. code-block:: shell

pip list

If wheel is not installed already, enter the following
into your command prompt.

.. code-block:: shell

pip install wheel

To upgrade, enter the following into your command prompt.

.. code-block:: shell

pip install --upgrade wheel
Loading