Python - Project

Card Puncher Data Processing

About

Project in Python as describe by Python 3 - SetupTools

Properties

Name

The project name is specified in the name properties in the setup function of the setup.py file

Structure

Project are a set of file to package a package.:

  • one package - a single top-level package that has the same name as your project
  • setup.py file for configuration
  • README.md, README.rst, README.txt, or README (written using reStructuredText or markdown with the appropriate key set) making-a-pypi-friendly-readme
  • MANIFEST.ini to package additional files (data, …). doc

More. See:

One commonly used package configuration has all the module source code in a subdirectory (often called the src layout), like this:

├── src
│   └── mypackage
│       ├── __init__.py
│       └── mod1.py
├── setup.py
└── setup.cfg

You can set up your setup.cfg to automatically find all your packages in the subdirectory like this:

# This example contains just the necessary options for a src-layout, set up
# the rest of the file as described above.

[options]
package_dir=
    =src
packages=find:

[options.packages.find]
where=src

Management

Configuration

See Python - setup.py

Sample

https://github.com/pypa/sampleproject

Editable Mode Installation (development mode)

The project is both installed and editable in project form. ie changes to the project source are immediately available in the staging area(s), without needing to run a build or install step after each change. The project appears to be installed, but yet is still editable from the src tree.

cd project_home
pip install -e .
#or
pip install -e youPath

It will also:

Dependencies will be installed in the usual, non-editable mode.

  • Install without deps
pip install -e . --no-deps

See also: develop - Deploy the project source in “Development Mode”

Documentation / Reference





Discover More
Card Puncher Data Processing
Python - setup.py

setup.py is a file found at the root directory of your project and serves two primary functions: configuration of the project command line interface for running various commands that relate to packaging...
Card Puncher Data Processing
Python - Dependency Management

See: syntax When you install a package, or declaring a dependency, you need to specify an package id that's known...
Card Puncher Data Processing
Python - Packages (Archive, Distribution)

in Python Packages (or better Distribution package) are the result of the packaging of a project that may contains one or more (regular) package regular packageregular package A package is a compressed...
Python Build Artifact Setup Py
Python - Regular Package (Shipping | Packaging)

and in Python How to release regular package adapted from (they are using the setuptools framework) With python 3. where: setup.py...
Card Puncher Data Processing
Python 3 - SetupTools

setuptools is an framework enhancement over distutils that allow to more easily build and distribute Python distributions. See ...
Flask Idea Nodebug
Python Web - Flask

Flask is web framework to create web application. The idea of Flask is to build a good foundation for all applications. Everything else is up to you or extensions. Flask is just not designed for large...



Share this page:
Follow us:
Task Runner