Before you install¶
Make sure you have a reasonably modern python. pyFF is developed using 3.6 but 3.7 will probably become the norm soon. It is recommended that you install pyFF into a virtualenv
Start by installing some basic OS packages. For a debian/ubuntu install:
# apt-get install build-essential python-dev libxml2-dev libxslt1-dev libyaml-dev
and if you’re on a centos system (or other yum-based systems):
# yum install python-devel libxml2-devel libxslt-devel libyaml-devel # easy_install pyyaml # bug in pip install pyyaml # yum install make gcc kernel-devel kernel-headers glibc-headers
If you want to use OS packages instead of python packages from pypi then consider also installing the following packages before you begin:
This method re-uses existing OS-level python packages. This means you’ll have fewer worries keeping your python environment in sync with OS-level libraries.
# apt-get install python-virtualenv # virtualenv python-pyff
Choose this method if you want the OS to keep as many of your packages up to date for you.
This method keeps everything inside your virtualenv. Use this method if you are developing pyFF or want to run multiple python-based applications in parallell without having to worry about conflicts between packages.
# cd $HOME # apt-get install python-virtualenv # virtualenv -p python3 python-pyff --no-site-packages
Choose this method for maximum control - ideal for development setups.
To verify that python 3.6 is the default python in the pyFF environment run
# python --version
The result should be Python 3.6 or later.
To verify that the version of pip you have is the latest run.
# pip install --upgrade pip
Now that you have a virtualenv, its time to install pyFF into it. Start by activating your virtualenv:
# source python-pyff/bin/activate
Next install pyFF:
# cd $HOME # cd pyFF # LANG=en_US.UTF-8 pip install -e .
This will install a bunch of dependencies and compile bindings for both lxml, pyyaml as well as pyXMLSecurity. This may take some time to complete. If there are no errors and if you have the pyff binary in your $PATH you should be done.
# cd $HOME # mkdir pyff-config # cd pyff-config
Unless you’ve made modifications, upgrading should be as simple as running
# source python-pyff/bin/activate # pip install -U pyff
This should bring your virtualenv up to the latest version of pyff and its dependencies. You probably need to restart pyffd manually though.
Now that you hopefully have a working installation of pyFF you are ready to start exploring all the ways pyFF can help you manage metadata. It may be good to go read the Quick Start Instructions now but in general pyFF should be run in the same directory that contains a pipeline in yaml format and depending on the nature of the pipeline additional files may be needed including things like…
- A list of metadata URLs.
- A set of files containing metadata URLs - eg XRD or MDSL files.
- A key and crt signing key pair which can be generated from genkey.sh in the scripts directory.