Comments (10)
Yes, it's in the TODO list:
Ponder to remove the py wheel and make the C Extension optional
Not very difficult to do:
myextension = Extension(
"myextension",
["myextension.c"],
optional=os.environ.get('CIBUILDWHEEL', '0') != '1',
)
https://cibuildwheel.readthedocs.io/en/stable/faq/#optional-extensions
from python-frozendict.
It should be fixed with the new release:
https://github.com/Marco-Sulla/python-frozendict/releases/tag/v2.3.5
Can you confirm it?
from python-frozendict.
It's not fixed. We still can't tell it not to try building the C extension for Python 3.11. Furthermore, now we need to explicitly pass CIBUILDWHEEL=1
to ensure that it silently doesn't ignore unrelated build failures on other Python versions.
from python-frozendict.
What's the problem of trying to build the C Extension for Python 3.11?
from python-frozendict.
The problem here is pip
and not supported platforms.
If someone wants to install the module for an architecture X and the arch X binary is not present on Pypi, pip downloads and install the pure py wheel if present. It does not try to install the sdist package, even if present.
On the contrary, if an sdist package is present and a wheel is not present, it tries to compile the sdist. But if so, the C Extension must be optional by default, or if the sdist install fails, no module will be installed.
This is much more simple for the end user, and a bit more complicated for devs. But I'm confident that devs are much more expert and it's quite trivial for them to add an env variable. I have to do the same on Conda.
Anyway, I could change how CIBUILDWHEEL works now. If 1, the Extension will be added as mandatory. If zero, the module will be compiled with no extension. If None, the above default behavior acts (Ext enabled but optional).
from python-frozendict.
I think something akin #69 is the best option where the user (or packager) can easily say "I want the C extension if it's supported on my interpreter" and the package takes care of "knowing" which Python versions are supported and which are not.
from python-frozendict.
#69 is not about this, but it's a good solution for your case, since it checks if a dir with C source files exists. If not, the py wheel is produced.
Since no src dir exists for Python 3.11, the PR will enable for 3.11 the py package by default.
This has also a side benefit to have a pure py package on Conda without trouble.
I'll accept the PR.
from python-frozendict.
Thank you.
from python-frozendict.
Released in 2.3.6, let me know if it's all OK.
from python-frozendict.
Thanks, it seems to work fine for us!
from python-frozendict.
Related Issues (20)
- [FEATURE] Create wheels for python 3.11 (and 3.12) HOT 3
- [BUG] Testing: object has no attribute 'mapping' HOT 2
- [BUG] Testing: object is not reversible HOT 11
- [ENHANCEMENT] Rename frozendict source dir HOT 1
- [FEATURE] Speeding up JSON and pickle: to_dict() method
- [BUG] Version 2.3.6 appears to have been yanked HOT 10
- [BUG] 2.3.7: pep517 based build procedure is not producing .whl archive with DSO module HOT 3
- [FEATURE] Please add generics HOT 1
- [BUG] TestCFrozendict::test_reversed <- test/common.py Fatal Python error: Aborted HOT 11
- [BUG] `frozendict()` vs `frozendict({})` type hints HOT 4
- [BUG] Union of frozendict and frozendict results in dict HOT 1
- [BUG] Git repo's about sidebar points to non-existent GitHub pages URL HOT 2
- [BUG] Python implementation pickles differently than native implementation HOT 7
- [BUG] Dill dumps the python implementation by-value HOT 7
- [FEATURE] Add a way to install the pure py implementation
- [FEATURE] Licensing permission for open-source projects that (seemingly) cannot comply with LGPL terms due to interfacing with commercial data HOT 2
- [BUG] `deepfreeze` modifies the original `dict` HOT 5
- [FEATURE] Should `Enum` be considered immutable by default? HOT 2
- [BUG] frozendict.deepfreeze is not in __init__.pyi HOT 4
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 python-frozendict.