diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2018-12-24 12:30:44 +0000 |
---|---|---|
committer | Chandan Singh <csingh43@bloomberg.net> | 2019-01-02 19:39:58 +0000 |
commit | 1cbd9a7381c32467b500b316cdac3c647a59e0dc (patch) | |
tree | d8c246eafa83b7c5784cda2745465980a2daa414 | |
parent | 32c47d1cec58c8832f526a5df7a0eb23251ac7e1 (diff) | |
download | buildstream-1cbd9a7381c32467b500b316cdac3c647a59e0dc.tar.gz |
Add requirements files for install, test and plugin dependencies
Add `.in` and `.txt` requirements files for BuildStream's pure python
dependencies. For each pair, the `.in` file is supposed to capture the
loose version requirements, and the corresponding `.txt` file is
supposed to have frozen requirements. We have 3 such sets:
* `requirements`: BuildStream's runtime dependencies
* `dev-requirements`: Dependencies for running tests
* `plugin-requirements`: Dependencies for core plugins
Note that the frozen requirements files will only be used for testing
purposes, and `setup.py` will continue to read loose requirements.
-rw-r--r-- | MANIFEST.in | 5 | ||||
-rw-r--r-- | dev-requirements.in | 11 | ||||
-rw-r--r-- | dev-requirements.txt | 39 | ||||
-rw-r--r-- | plugin-requirements.in | 2 | ||||
-rw-r--r-- | plugin-requirements.txt | 4 | ||||
-rw-r--r-- | requirements.in | 15 | ||||
-rw-r--r-- | requirements.txt | 18 | ||||
-rwxr-xr-x | setup.py | 23 |
8 files changed, 88 insertions, 29 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index b8429830a..96fce72b3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -31,7 +31,12 @@ include .pylintrc recursive-include buildstream/_protos *.proto # Requirements files +include requirements.in +include requirements.txt +include dev-requirements.in include dev-requirements.txt +include plugin-requirements.in +include plugin-requirements.txt # Versioneer include versioneer.py diff --git a/dev-requirements.in b/dev-requirements.in new file mode 100644 index 000000000..42c300f39 --- /dev/null +++ b/dev-requirements.in @@ -0,0 +1,11 @@ +coverage == 4.4.0 +pylint +pytest >= 3.9 +pytest-codestyle >= 1.4.0 +pytest-cov >= 2.5.0 +pytest-datafiles >= 2.0 +pytest-env +pytest-pylint +pytest-xdist +pytest-timeout +pyftpdlib diff --git a/dev-requirements.txt b/dev-requirements.txt index 42c300f39..28e3560e4 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,11 +1,28 @@ -coverage == 4.4.0 -pylint -pytest >= 3.9 -pytest-codestyle >= 1.4.0 -pytest-cov >= 2.5.0 -pytest-datafiles >= 2.0 -pytest-env -pytest-pylint -pytest-xdist -pytest-timeout -pyftpdlib +coverage==4.4 +pylint==2.2.2 +pytest==4.0.2 +pytest-codestyle==1.4.0 +pytest-cov==2.6.0 +pytest-datafiles==2.0 +pytest-env==0.6.2 +pytest-pylint==0.13.0 +pytest-xdist==1.25.0 +pytest-timeout==1.3.3 +pyftpdlib==1.5.4 +## The following requirements were added by pip freeze: +apipkg==1.5 +astroid==2.1.0 +atomicwrites==1.2.1 +attrs==18.2.0 +execnet==1.5.0 +isort==4.3.4 +lazy-object-proxy==1.3.1 +mccabe==0.6.1 +more-itertools==5.0.0 +pluggy==0.8.0 +py==1.7.0 +pycodestyle==2.4.0 +pytest-forked==0.2 +six==1.12.0 +typed-ast==1.1.1 +wrapt==1.10.11 diff --git a/plugin-requirements.in b/plugin-requirements.in new file mode 100644 index 000000000..e3527285d --- /dev/null +++ b/plugin-requirements.in @@ -0,0 +1,2 @@ +arpy +PyGObject diff --git a/plugin-requirements.txt b/plugin-requirements.txt new file mode 100644 index 000000000..6841612bd --- /dev/null +++ b/plugin-requirements.txt @@ -0,0 +1,4 @@ +arpy==1.1.1 +PyGObject==3.30.4 +## The following requirements were added by pip freeze: +pycairo==1.18.0 diff --git a/requirements.in b/requirements.in new file mode 100644 index 000000000..7313d7dcf --- /dev/null +++ b/requirements.in @@ -0,0 +1,15 @@ +Click +grpcio >= 1.10 +jinja2 >= 2.10 +pluginbase +protobuf >= 3.5 +psutil +# According to ruamel.yaml's PyPI page, we are suppose to use +# "<=0.15" in production until 0.15 becomes API stable. +# However we need ruamel.yaml 0.15.41 or greater for Python 3.7. +# We know that ruamel.yaml 0.15.52 breaks API in a way that +# is incompatible with BuildStream. +# +# See issues #571 and #790. +ruamel.yaml >= 0.15.41, < 0.15.52 +setuptools diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..17df16af4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +Click==7.0 +grpcio==1.17.1 +pluginbase==0.7 +protobuf==3.6.1 +psutil==5.4.8 +# According to ruamel.yaml's PyPI page, we are suppose to use +# "<=0.15" in production until 0.15 becomes API stable. +# However we need ruamel.yaml 0.15.41 or greater for Python 3.7. +# We know that ruamel.yaml 0.15.52 breaks API in a way that +# is incompatible with BuildStream. +# +# See issues #571 and #790. +ruamel.yaml==0.15.51 +setuptools==39.0.1 +## The following requirements were added by pip freeze: +Jinja2==2.10 +MarkupSafe==1.1.0 +six==1.12.0 @@ -270,9 +270,12 @@ def get_cmdclass(): ##################################################### # Gather requirements # ##################################################### -with open('dev-requirements.txt') as dev_reqs: +with open('dev-requirements.in') as dev_reqs: dev_requires = dev_reqs.read().splitlines() +with open('requirements.in') as install_reqs: + install_requires = install_reqs.read().splitlines() + ##################################################### # Prepare package description from README # ##################################################### @@ -334,23 +337,7 @@ setup(name='BuildStream', os.path.join('buildstream', 'data', 'bst') ]) ], - install_requires=[ - 'setuptools', - 'psutil', - # According to ruamel.yaml's PyPI page, we are suppose to use - # "<=0.15" in production until 0.15 becomes API stable. - # However we need ruamel.yaml 0.15.41 or greater for Python 3.7. - # We know that ruamel.yaml 0.15.52 breaks API in a way that - # is incompatible with BuildStream. - # - # See issues #571 and #790. - 'ruamel.yaml >= 0.15.41, < 0.15.52', - 'pluginbase', - 'Click >= 7.0', - 'jinja2 >= 2.10', - 'protobuf >= 3.5', - 'grpcio >= 1.10', - ], + install_requires=install_requires, entry_points=bst_install_entry_points, tests_require=dev_requires, zip_safe=False) |