On 25 August 2015 at 12:58, Bruno Oliveira <[email protected]> wrote:
>
>> * Floris Bruynooghe <[email protected]> [2015-08-25 09:45:31 +0100]:
>> This on the other hand is more of a blocker.  I think what we need is
>> some code in setup.py which automatically fetches the required pluggy
>> version from pypi and vendors it when  making sdists and wheels.
>
> Any reason to pinpoint that at release time only? I think it is desirable to
> be able to pinpoint this during development as well.

Version numbers are not a problem, pluggy uses semantic versioning so
if it breaks the API the versioned dependency (>=0.3.0,<0.4.0) in
setup.py will do this just fine for us during development.  The reason
to vendor pluggy is so that when another project uses pluggy, it could
depend on say 0.4.X while py.test was still on 0.3.X and then this
other project would not be able to use py.test for it's tests because
the library would conflict.  This is why I suggest the bundeling
should only happen in the sdist/wheel.

> As I understand it, vendoring means that we will have a copy of pluggy's
> code into pytest under a different package name (say,
> "_pytest.vendor.pluggy").

yes

> How about:
>
> * Create a script which fetches the latest pluggy version, and installs it
> into `_pytest.vendor.pluggy`;
> * Add `_pytest.vendor.pluggy` to version control
> * Update all references in pytest from `pluggy` to `_pytest.vendor.pluggy`;
> * Remove the dependency from `setup.py`;

Because of what I mentioned above I don't think pluggy should be
checked into py.test's repo.  Only when creating the sdist or wheel do
we want to download the file, install it into _pytest/pluggy.py (or
wherever) and make sure setuptools packages it.  It's probably best to
keep the vendored pluggy.py in .gitignore as well.  For extra bonus
points having a custom setup.py install option which excludes the
vendored pluggy so distributors like Debian can be kept happy.

This way the vendoring will never be out of date.  Running tests using
tox will use the vendored pluggy, while running test in a dev venv
with `pip install -e .` of py.test will not use the vendored pluggy.
_______________________________________________
pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to