Hardware 3 - Packaging
prerequisit: setup git
Packaging
If you would like to include your shiny new plugin as a ScopeFoundryHW plug-in, ie sharing the ScopeFoundryHW package name and hosting it on github.com/scopefoundry. Here are some tips:
Use the example plug-in HW_random_gen
as an example. It includes a README.md, LICENSE, and setup.py files required to make a plug-in package.
Mapping of module name to github repo name:
- Python package name
ScopeFoundryHW.hw_plugin_name
- Repo Location
https://github.com/ScopeFoundry/HW_hw_plugin_name
The setup.py
tells pip
how to install your plug-in, along with meta-data about the plug-in. Here is the setup.py from HW_random_gen:
from setuptools import setup
setup(
name = 'ScopeFoundryHW.random_gen',
version = '0.0.1',
description = 'ScopeFoundry Hardware plug-in: Dummy random number generator',
# Author details
author='Edward S. Barnard',
author_email='esbarnard@lbl.gov',
# Choose your license
license='BSD',
package_dir={'ScopeFoundryHW.random_gen': '.'},
packages=['ScopeFoundryHW.random_gen',],
#packages=find_packages('.', exclude=['contrib', 'docs', 'tests']),
#include_package_data=True,
package_data={
'':["*.ui"], # include QT ui files
'':["README*", 'LICENSE'], # include License and readme
},
)
How to contribute HW_*
This page periodically scans GitHub for HW_* repos and adds it to the references. Thereby, it considers users/organisations that forked the ScopeFoundry Repo.
So to share your hardware:
- make a github account
- Fork ScopeFoundry repo to your github account
- Follow packaging instructions
and this page should find your hardware.
Thanks.
Where to Find Out More
This tutorial code is available in the HW_random_gen repository.
For questions about this tutorial or ScopeFoundry in general, please visit and post on the ScopeFoundry project mailing list and forum.
For source code of all ScopeFoundry projects visit our GitHub page.