Comments (3)
I'm not sure if this resolves all the issues you bring up, but here's something of mine I've packaged to use wheels: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pyfil
The wheel is created from source at build()
time in the PKGBUILD
. pip (and wheel!) are indeed makedepends. This is the script I used to generate it (inspired by pip2pkgbuild, though it is much simpler, being only designed to fit my personal usecase): https://github.com/ninjaaron/dot/blob/master/bin/pkg.py
As a side note, I can assure you that building packages in the normal manner with setup.py does not generate bytecode, though naturally, compiled extensions from C or whatever are built. Check the files from the pip2pkgbuild package and verify.
The only possible downside I can see is that the bytecode will no longer be valid when new versions of python are released, but then it can fall back to source (which leaves us in a situation no worse than using setup.py). This can be amended by rebuilding the package with the new version of python. Well, I guess requiring pip and wheel might also be a downside, but I feel like these are pretty basic dependencies for most systems running python.
One final note is that there are many, many packages in the AUR that fetch binaries and do not actually build from source. This is what my script originally did, but I changed it later to build the wheels locally since I believe this to be more in line with the spirit of the AUR (even if it is not always observed in practice.
from pip2pkgbuild.
Firstly, sorry for so late to reply and thanks for using pip2pkgbuild
.
I have no idea about how wheels work and how to fit it into the packaging process of PKGBUILD
. If you have an example PKGBUILD
file that use this way of packaging I would like to have a try to add this feature.
Something I want to mention, a Arch Linux
package's build process is performed within the packaging time (when you run makepkg
from a directory contained a PKGBUILD
), after packaging you got a <package-name>.pkg.<archive-format>
file (the package), so, a python module Arch Linux
package will always ships with bytecode compiled and binary compiled components.
from pip2pkgbuild.
Packages made from wheels would probably not be allowed in the AUR since they may contain binaries (shared objects). Wheels would probably only be allowed once the package makes the community
repository.
The wheel file may be architecture dependent since it may contain compiled c extensions. It also may be minor version dependent. i.e. Python 3.4 only or Python 3.5 only.
You would replace the source of the PKGBUILD
with the wheel file instead, so I guess the source
may need to change depending on the architecture.
The build()
function would no longer be needed.
The package()
functions would be using pip to install the wheel, so pip would need to be added to makedepends
. Note that this doesn't mean pip is fetching the wheel, but just installing the .whl
file into the system.
Also note pypi json contains wheels as bdist_wheel
.
A good example is numpy: https://pypi.python.org/pypi/numpy
from pip2pkgbuild.
Related Issues (20)
- Why is this not zip-safe HOT 1
- AttributeError: 'NoneType' object has no attribute 'lower' HOT 1
- Install License when available
- Possible to use other source? HOT 3
- https instead of http HOT 2
- Use importlib instead of imp?
- Use SHA256 instead of MD5
- Add LICENSE to repo
- Setuptools deprecating, using new python method for installing HOT 2
- Can't create a PKGBUILD: module not found HOT 3
- Add support for poetry packages. HOT 2
- [bug] - should be _ HOT 2
- README : AUR URL changed
- Setup.py is supposedly deprecated HOT 3
- Failed to install packages whose name includes underscore HOT 1
- Use SPDX licenses
- Get dependence from pypi json "requires_dist"
- Make PEP517+python 3 the default HOT 3
- imp module doesn't exists anymore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pip2pkgbuild.