Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use pip to install dependencies first
- to avoid having to run `setup.py` twice manually, which can go unnoticed if this package is being installed as a dependency. - because `setup_requires` only downloads packages, w/o installing them - because the combination of `setup_requires` with `install_requires` do not work as expected under all circumstances [1]. - even if they did work as desired, some intermediate callback would have to be passed to `setuptools.setup`, to be called between `setup_requires` and what follows. This approach is nested, thus against PEP 20. - so better flat, i.e., first install the necessary dependencies, then build the parser table, then call `setuptools.setup` - requires that `pip` be present, but not having `pip` is a bad idea anyway -- avoid using `easy_install` (which is available as `setuptools.command.easy_install`) - a branch tarball is downloaded from github to avoid cloning the whole repository, which is what `pip` does if given a git repo - so using `pip` isn't strictly necessary, but if we did fetch from a repo, it would be necessary, because that's not possible with vanilla `setuptools`. - it also simplifies code by not having to try-except, just let `pip` skip dependencies that are already met. - if the table generation fails for some reason other than absence of `ply`, that will not go unnoticed any more. [1] https://bitbucket.org/pypa/setuptools/issue/209/setup_requires-and-install_requires-dont
- Loading branch information