Skip to content

Sample project to demonstrate pip integration

Notifications You must be signed in to change notification settings

jp74/pip-mockup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Sample Instructions for package development

Create and upload package

  1. Create an account at pypi.python.org
  2. Edit 'setup.py' file to describe package
  3. Use python setup.py check to validate file
  4. Use python setup.py register to publish package info (will prompt for un/pw)
  5. Use python setup.py sdist upload to create a download file, and push to Pypi

Register command is used to create the initial package, as well as send updates. By default the Pypi page will only show the latest package info, however this can be amended within the web interface.

Testing install

pip install -e git+https://[email protected]/user/package_name.git#egg=package_name

Project layout

MANIFEST.in # Describe non-Python files to include in distribution
README.md # Just good practice!
setup.py # Defines package info
package_name/
  __init__.py
  file.py

Sample setup.py

from setuptools import setup, find_packages
import os
import pip_mockup as app


CLASSIFIERS = [
    "Framework :: Django",  # https://pypi.python.org/pypi?%3Aaction=list_classifiers
]

setup(
    author="User goes here",
    author_email="[email protected]",
    name="pip_mockup",
    version=app.__version__,
    description="My test package",
    # Long desc will display on the PyPi page
    long_description=open(os.path.join(os.path.dirname(__file__), 'README.md')).read(),
    url="https://github.com/JP74/pip-mockup",
    download_url="https://github.com/JP74/pip-mockup/archive/master.zip",
    license="BSD",
    platforms=['OS Independent'],
    classifiers=CLASSIFIERS,
    install_requires=[
        'Django>=1.6',
    ],
    packages=find_packages(exclude=["project", "project.*"]),
    include_package_data=True,
    zip_safe=True,
    test_suite='run tests.main',
)

About

Sample project to demonstrate pip integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages