Comments (6)
@stanislavlevin thanks for reporting this.
In principle this is what the platform
setup option (which is not documented, our bad there) should be for, so you can specify a different platform from the one you are building in. See 42b8a15 for details. I think it should be possible to pass this option both via the command line (python setup.py build_ext --platform=...) or via a
setup.cfg` file.
Please let me know if you can overcome your cross-compilation issue with this option. On my end I'll try to document the option a bit better for future users.
from crc32c.
This time the issue has been solved as:
--- a/crc32c/setup.py
+++ b/crc32c/setup.py
@@ -60,7 +60,7 @@ class _build_ext(build_ext):
assert(len(self.distribution.ext_modules) == 1)
platform = self.platform.lower()
is_intel = platform in ['x86_64', 'amd64', 'i386', 'i686']
- is_arm = platform in ['aarch64_be', 'aarch64', 'armv8b', 'armv8l']
+ is_arm = platform in ['aarch64_be', 'aarch64']
Next update time, I will try the explicit platform option for armh.
Thank you!
from crc32c.
@stanislavlevin please let me know if the platform
flag works (it would prevent modifying the sources in order to compile the code), and please close this ticket if the problem can be avoided that way.
from crc32c.
ALTLinux is RPM based, so, for building packages we are using RPM specfile with corresponding RPM macros syntax. For example, there is common RPM macro to build/install python packages:
%build
%python3_build_debug
%install
%python3_install
which roughly invoke python3 setup.py build
(not directly build_ext). Setuptools doesn't support passing down additional options for subsequent commans. So even if I pass --platform
build fails:
+ /usr/bin/python3 setup.py build --debug --platform x86_64
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --platform not recognized
Pretty sure, other RPM based distros have the same issue.
from crc32c.
@stanislavlevin is it an option to create a local setup.cfg
before running the rest of the commands? You could write the setting there; i.e.:
[build_ext]
platform = ${TARGET_MACHINE_ARCH}
from crc32c.
Closing as directions were given on how to address the issue fundamentally, plus the original problem was circumvented anyway.
from crc32c.
Related Issues (18)
- Installing error under win10 system HOT 15
- Implementing crc32c for AARCH64 HOT 2
- Changing package import logic HOT 5
- Example calculating crc32c from file? HOT 9
- Binary wheels seem to be missing for py38 windows and mac HOT 3
- Fallback to Python does not work on Python 3.8 (possibly others?) HOT 3
- copyright and license for file crc32c_arm64.c is illogical HOT 3
- Compiled wheels HOT 7
- Tests fail on big-endian HOT 2
- CRC32 calculation correct? HOT 2
- Add support to release aarch64 wheels HOT 1
- Python 3.10 Wheels? HOT 7
- Add optional software implementation HOT 1
- Change access to software implementation HOT 8
- Building on non-Intel platforms HOT 2
- Source tarball for version 1.6 is broken HOT 3
- Mac wheels for 1.7 HOT 2
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 crc32c.