Comments (12)
Current release is live on PyPI, issues here mostly appear to have been addressed, at least as far as publishing a source distribution.
from adafruit_python_dht.
+1
from adafruit_python_dht.
Yes please!
from adafruit_python_dht.
+1 ! For people working with virtualenv, this would be really convenient.
from adafruit_python_dht.
Great issue and apologies it's been a while to be reviewed. So the tricky thing here is that pypi has no concept of platforms like the Raspberry Pi, BeagleBone Black, etc.--as far as PyPi is concerned these are all Linux platforms that are the same. The trouble is we need to compile specific code for each of these boards, and right now that logic lives in the setup.py when the install is run. If this is bundled up and published to PyPi using the wheel format they want everyone to use these days it won't run the setup.py and will instead the same (incorrect) compiled code across all platforms.
I'm not really familiar with the eccentricities of Python's binary & source distributions so perhaps there is a magic way to make this kind of scenario work. From what I understand more granular platform/hardware-specific binary wheels are a known limitation of python's packaging system today. If someone knows of a way feel free to suggest it--for now I'll keep this open as a reminder of it being a known issue.
from adafruit_python_dht.
You can simply release it as a source distribution (sdist
without bdist
, no wheels). This is the baseline way to publish to PyPI. Produces a tar file which pip will download, extract and run python setup.py install
on automatically.
This way it'll compile on each machine that it's installed on, which should address the cross-platform concerns. Obviously a binary distribution with wheels is preferred for speed, but if that isn't possible it won't stop you publishing on PyPI.
To test it locally: (spits out a tar.gz which you can feed to pip install
)
python setup.py sdist
There is a detailed (source only) guide here.
Edit: The project will need a few small tweaks to prep it for sdist
, but this fork has already done most of the work.
from adafruit_python_dht.
Obviously a binary distribution with wheels is preferred for speed, but if that isn't possible it won't stop you publishing on PyPI.
I've built a system to build ARM wheels (on a Pi 3) of every package on PyPI. It's done one complete sweep, and I'm going to be making sure it keeps everything up to date, and I'll build ARMv6 wheels too at some point. [done] Check it out: https://www.piwheels.org/
from adafruit_python_dht.
@bennuttall: That looks great, nice project! I confess to not understanding the platform differences well, but I think part of the problem @tdicola was referring to was that although Pi3 and Beaglebone Black are both ARMv7, they require different code to address the GPIO hardware. So to create an ARMv7 bdist_wheel which can be published to PyPI, the project would need to be changed to detect the hardware platform at runtime (currently this is done at install/compile time).
If I've got this right, we'll need to stick to a source distribution on PyPI unless/until such a rewrite is done, to ensure that it still works on Beaglebone. But it should still work fine for your dedicated Pi3 pip mirror repo (since presumably people would only be pointing Raspberry Pis at it). And if you're mirroring from PyPI, then all the more reason for us to get an sdist up on PyPI.
from adafruit_python_dht.
So to create an ARMv7 bdist_wheel which can be published to PyPI
As far as I'm aware, PyPI doesn't accept ARM wheels anyway
from adafruit_python_dht.
The name has been stomped on; see #77.
from adafruit_python_dht.
PyPI does now allow Arm wheels to be uploaded, but Raspbian users get piwheels by default now anyway.
from adafruit_python_dht.
piwheels has Python wheels for this package too: https://www.piwheels.org/simple/Adafruit_Python_DHT/
from adafruit_python_dht.
Related Issues (20)
- pip package looks broken HOT 4
- Installation failure on Windows 10 HOT 2
- hello...I try to install python library of dht11 on raspberry pi but it appear no route to host?what is the problem?please help me... HOT 2
- Semaphore not finding library HOT 4
- Cable Length Causes incorrect DHT11 Readings HOT 6
- import errors in setup.py HOT 1
- unknown platform due to very wrong detection mechanism HOT 1
- Specifiy Raspberry version when using pip3 install Adafruit_DHT HOT 3
- IOError: [Errno 24] Too many open files: '/proc/cpuinfo' HOT 2
- Can't install on RPI3 HOT 1
- Will this work in Ubuntu 16.04 with normal pc HOT 7
- Declare sensor dinamically HOT 2
- DHT22 humidity and temperature values are incorrect HOT 2
- setup.py fails to install with error "TypeError: __init__() takes exactly 2 arguments (4 given)" HOT 4
- Google Authentication Error HOT 1
- I can not install RaspBerry 3 and Raspbian Jessie Lite HOT 10
- Broken link in ez_setup HOT 4
- AdafruitDHT.py show higher temp HOT 2
- Problem witch installing HOT 5
- Failed pip Install of Adafruit_Python_DHT on Raspbian Stretch HOT 19
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 adafruit_python_dht.