diff --git a/README.rst b/README.rst index 2f30ded7f..c69ff02ea 100644 --- a/README.rst +++ b/README.rst @@ -25,6 +25,11 @@ The dependencies are available via pip:: # Add ~/.local/bin to your $PATH, e.g. by adding this to ~/.bashrc: PATH=$HOME/.local/bin:$PATH +Or, you can use tox:: + + tox -e develop + . .tox/develop/bin/activate + Build ~~~~~ diff --git a/docs/setup.py b/docs/setup.py new file mode 100644 index 000000000..22a93a461 --- /dev/null +++ b/docs/setup.py @@ -0,0 +1,4 @@ +import setuptools + + +setuptools.setup(setup_requires=["pbr"], pbr=True, include_package_data=True) diff --git a/scripts/compatibility_matrix.py b/scripts/compatibility_matrix.py index 423417ba1..df92340b2 100755 --- a/scripts/compatibility_matrix.py +++ b/scripts/compatibility_matrix.py @@ -95,23 +95,10 @@ def freebsd_pre_openzfs(): # There could be some lag between OpenZFS upstream and the FreeBSD, # or even Linux implementations. sources = {} - with urlopen('https://www.freebsd.org/releases/') as web: - versions = findall(r'/releases/([0-9.]+?)R', - web.read().decode('utf-8', 'ignore')) - with urlopen('https://svnweb.freebsd.org/base/release/') as web: - data = web.read().decode('utf-8', 'ignore') - actualversions = [] - for ver in set(versions): - found = list(sorted(findall( - r'/base/release/(' + ver.replace('.', '\\.') + r'[0-9.]*)', - data - ))) - if found: - actualversions.append(found[-1]) - for ver in actualversions: - sources[ver] = ('https://svnweb.freebsd.org/base/release/{}/cddl/' - 'contrib/opensolaris/cmd/zpool/zpool-features.7' - '?view=co'.format(ver)) + + sources['12'] = ('https://raw.githubusercontent.com/freebsd/freebsd-src/' + 'refs/heads/stable/12/cddl/contrib/opensolaris/' + 'cmd/zpool/zpool-features.7') return sources @@ -182,6 +169,7 @@ def nexenta(): openzfs_key = 'OpenZFS (Linux, FreeBSD 13+)' +illumos_key = 'Illumos' sources = { openzfs_key: openzfs(), 'FreeBSD pre OpenZFS': freebsd_pre_openzfs(), @@ -190,7 +178,7 @@ def nexenta(): 'Joyent': joyent(), 'NetBSD': netbsd(), 'Nexenta': nexenta(), - 'Illumos': { + illumos_key: { 'master': 'https://raw.githubusercontent.com/illumos/illumos-gate/' 'master/usr/src/man/man7/zpool-features.7', }, @@ -356,11 +344,12 @@ def nexenta(): html.write('no') for name, vers in header: for ver in vers: - # custom case for OpenZFS FreeBSD https://github.com/openzfs/zfs/pull/12735 if (feature == 'edonr' and name == openzfs_key and '.' in ver and not (int(ver.split('.')[0]) >= 2 and int(ver.split('.')[1]) >= 2)): - html.write('yes1') + html.write('yes1') + elif (feature == 'encryption' and name == illumos_key): + html.write('yes2') elif (name, ver) in names: html.write('yes') else: @@ -371,6 +360,7 @@ def nexenta(): html.write('

Notes:

\n') html.write('
    \n') html.write('
  1. Edonr support was not enabled in FreeBSD with OpenZFS up to 2.1 release included
  2. \n') +html.write('
  3. While Illumos have nearly same encryption logic, it\'s format is not 100% compatible with OpenZFS encryption format, so you may have problems with cross-platform encryption.
  4. \n') html.write('
\n') html.write('\n') now = datetime.now().isoformat() + 'Z' diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..3f20c961b --- /dev/null +++ b/tox.ini @@ -0,0 +1,29 @@ +[tox] +envlist = py3,pep8 +skipdist = True +skip_install = True + +[testenv] +basepython = python3 +skipdist = True +skip_install = True +deps = pytest +commands = pytest {posargs} + +[testenv:pep8] +deps = flake8 +commands = + flake8 + +[testenv:develop] +usedevelop = true +basepython = python3 +deps = -r{toxinidir}/docs/requirements.txt + esbonio>=0.12.0 +commands = {posargs} + +[testenv:esbonio] +usedevelop = true +basepython = python3 +deps = esbonio>=0.12.0 +commands = {posargs}