1

I wanted my package to be only available on 32bit and 64bit windows 10, how can i do this via setup.py ?

I already tried adding those classifiers for windows 10 and win32 environment, but its still generating a package with "none-any" in its wheel name.

I needed it to be something like "win-amd64-x86"(don't remember exactly). I have seen several other packagees with similar naming scheme.

I know i can manually rename the wheel file to do what i want but what is the proper way to do this ?

In some PEP document i read that Supported-Platforms: argument is what i need but i don't know what are possible options to it and where do i put this argument ?

0xB00B
  • 1,598
  • 8
  • 26
  • Why do you want to restrict platforms if you don't have to? `wheel` will figure out arch restrictions depending on whether platform-specific binaries are packaged in your code or not. it sounds like you just build a [pure python package](https://stackoverflow.com/questions/45976946/what-is-pure-python), which should work on any arch - as `wheel` is telling you. If you are still convinced that you need to set it manually, is this here what you're looking for? https://stackoverflow.com/questions/45150304/how-to-force-a-python-wheel-to-be-platform-specific-when-building-it – Arne Apr 12 '21 at 09:26
  • My package is not Pure Python, its more of a Python wrapper around c# application, and it only works on Windows 10 (x86/amd64). Wheel didn't automatically detect Anything and produce whl file narked as "none-any", due to this i am even able to install it from pip on android (aarch64/armv8 cpu), which I don't want to happen. – 0xB00B Apr 13 '21 at 13:38
  • then, if you can make the post I linked work for you, could you either suggest it as dupe target, or post your modifications as a self-answer? I'm afraid this question might be too specific to be reliably solved by anyone that isn't you. – Arne May 14 '21 at 13:22
  • Actually I have solved it already, and even forgot that I asked this question. – 0xB00B May 15 '21 at 14:42

1 Answers1

1

Coudn't make it "Win 10 Only", but for "Windows Only", it can be done by using --plat-name argument to setup.py

For 32 bit Windows :-

python setup.py bdist_wheel --plat-name win32

For 64 bit Windows :-

python setup.py bdist_wheel --plat-name win_amd64

Also See : How to force a python wheel to be platform specific when building it?

0xB00B
  • 1,598
  • 8
  • 26