ALBA controls meta package
Project description
ALBA synchrotron python meta package
This is ALBA synchrotron python meta package.
Namespaces are one honking great idea -- let's do more of those!
source: The Zen of Python, by Tim Peters
How to create an alba sub-module
Let's say a new high pressure lab has been installed at ALBA which requires specific software. The goal is the user can type:
import alba.hplab
... to have access to ALBA's specific high pressure lab software.
Preparation
In the future there might be a cookie cutter for this. For now we have to bootstrap the project by hand:
- create a directory called
hplab
and enter it. - create a directory called
alba
- create a
alba/__init__.py
file with a single line:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
It is crucial that the alba/__init__.py
has this precise contents
and no more.
- create a setup.py has usual. Here is a minimal version:
# setup.py
from setuptools import setup, find_packages
setup(
name="alba-hplab",
author="ALBA controls team",
author_email="controls-software@cells.es",
packages=find_packages(),
description="ALBA controls HP Lab software",
version="0.0.1"
)
- create a
alba/hplab
directory. This is where you should put the specific code for ALBA's HP lab.
That's it! If you publish your package on pypi you will be able to install your software anywere with:
pip install alba-hplab
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file alba-0.1.0.tar.gz
.
File metadata
- Download URL: alba-0.1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.0.post20200616 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ddb56d71aa2c16a6fd8079f1418c9993f407fbb8986c3f3761708020296741f |
|
MD5 | c64d45882425463bb9959779dad1f1c8 |
|
BLAKE2b-256 | 37c3eeda8cfcc62da0799edc3279509167e2e4be2e92aece0818a4b1e558bce6 |