-
Notifications
You must be signed in to change notification settings - Fork 44
Use setuptools to locate XML to read #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
68c118c
to
3ac7da4
Compare
A bit more justification as to why this is required:
Once merged, I will follow up with a pull request to fix PeachPy installation, making it so that the build/install/develop phases automatically do the code generation required. |
This makes the code compatible with opcodes being packaged up as an .egg file, which is required for supporting It also makes setuptools a requirement for installing the package. This should probably be documented. This is part of making PeachPy easy to install by making the code generation happen automatically during installation time (see Maratyszcza/PeachPy#38).
3ac7da4
to
1ae81fb
Compare
This patch makes setuptools a dependency. This is needed to make `setup.py` automatically make the `Opcodes` module available at setup time. Opcodes is made into a setup-time dependency, and if the module is installed with `python setup.py build` or `python setup.py develop` or `pip install PeachPy` or `pip install --editable PeachPy`, then the `python setup.py generate` command is run automatically. This patch depends on Maratyszcza/Opcodes#5 because of the way setuptools handles setup-time dependencies. They are not installed proper, but made available as an .egg file. Opcodes, before Maratyszcza/Opcodes#5, tries to read the XML descriptions by opening a file relative to `__file__`, which is not a thing which can be read with `open()`. Instead, it has to use `pkg_resources` to do so. With these two PRs merged, it should be possible to `pip install git+https://github.com/Maratyszcza/PeachPy`. We could also then discuss making it easy to package up and upload to PyPi.
Committed manually as 653f470, with some modifications |
Slight problem with your modifications, I now get this:
|
Sorry, this is probably an unrelated problem. Investigating. |
Should be fixed with fae77dd2078731127c0c7c8807fc41e024451dcd |
This patch makes setuptools a dependency. This is needed to make `setup.py` automatically make the `Opcodes` module available at setup time. Opcodes is made into a setup-time dependency, and if the module is installed with `python setup.py build` or `python setup.py develop` or `pip install PeachPy` or `pip install --editable PeachPy`, then the `python setup.py generate` command is run automatically. This patch depends on Maratyszcza/Opcodes#5 because of the way setuptools handles setup-time dependencies. They are not installed proper, but made available as an .egg file. Opcodes, before Maratyszcza/Opcodes#5, tries to read the XML descriptions by opening a file relative to `__file__`, which is not a thing which can be read with `open()`. Instead, it has to use `pkg_resources` to do so. With these two PRs merged, it should be possible to `pip install git+https://github.com/Maratyszcza/PeachPy`. We could also then discuss making it easy to package up and upload to PyPi.
I had concluded the same change which I've since rebased on top of. |
This patch makes setuptools a dependency. This is needed to make `setup.py` automatically make the `Opcodes` module available at setup time. Opcodes is made into a setup-time dependency, and if the module is installed with `python setup.py build` or `python setup.py develop` or `pip install PeachPy` or `pip install --editable PeachPy`, then the `python setup.py generate` command is run automatically. This patch depends on Maratyszcza/Opcodes#5 because of the way setuptools handles setup-time dependencies. They are not installed proper, but made available as an .egg file. Opcodes, before Maratyszcza/Opcodes#5, tries to read the XML descriptions by opening a file relative to `__file__`, which is not a thing which can be read with `open()`. Instead, it has to use `pkg_resources` to do so. With these two PRs merged, it should be possible to `pip install git+https://github.com/Maratyszcza/PeachPy`. We could also then discuss making it easy to package up and upload to PyPi. Try removing pip install -r requirements and generate step from installation Add six and enum34 to install_requires Add six to setup_requires Upgrade to Opcodes==0.3.10 Remove peachpy import from setup.py (and duplicate the version number by writing it literally) Fix setup.py for python2.7 Run tests with --no-path-adjustment Put nosetests configuration in setup.cfg Remove Opcodes from install_requires
This patch makes setuptools a dependency. This is needed to make `setup.py` automatically make the `Opcodes` module available at setup time. Opcodes is made into a setup-time dependency, and if the module is installed with `python setup.py build` or `python setup.py develop` or `pip install PeachPy` or `pip install --editable PeachPy`, then the `python setup.py generate` command is run automatically. This patch depends on Maratyszcza/Opcodes#5 because of the way setuptools handles setup-time dependencies. They are not installed proper, but made available as an .egg file. Opcodes, before Maratyszcza/Opcodes#5, tries to read the XML descriptions by opening a file relative to `__file__`, which is not a thing which can be read with `open()`. Instead, it has to use `pkg_resources` to do so. With these two PRs merged, it should be possible to `pip install git+https://github.com/Maratyszcza/PeachPy`. We could also then discuss making it easy to package up and upload to PyPi. Try removing pip install -r requirements and generate step from installation Add six and enum34 to install_requires Add six to setup_requires Upgrade to Opcodes==0.3.10 Remove peachpy import from setup.py (and duplicate the version number by writing it literally) Fix setup.py for python2.7 Run tests with --no-path-adjustment Put nosetests configuration in setup.cfg Remove Opcodes from install_requires
This makes the code compatible with opcodes being packaged up as an .egg
file, which is required for supporting
It also makes setuptools a requirement for installing the package. This
should probably be documented.
This is part of making PeachPy easy to install by making the code
generation happen automatically during installation time (see
Maratyszcza/PeachPy#38).