Use
Example to 3.8 not in my Path so take in from Scripts folder,and call it
This is just the same way you make it if want to use PyPi.
PyPi is a central disruption of
After upload wheel to PyPi your wheel get shorter name.
bdist_wheel
so you get the real wheel format .whl
.Example to 3.8 not in my Path so take in from Scripts folder,and call it
vvsearch
to avoid name conflict.# vvsearch.py def search4vowels(phrase: str) -> set: vowels = set('aeiou') return vowels.intersection(set(phrase)) def search4letters(phrase: str, letters: str) -> set: return set(letters).intersection(set(phrase)) if __name__ == '__main__': print(search4letters('hitch-hiker', 'aeiou')) print(search4letters('galaxy', 'xyz')) print(search4letters('life, the universe, and everything', 'o'))
# setup.py from setuptools import setup setup( name="vvsearch", version='1.0', py_modules=['vvsearch'], description="Search Tool", url='https://python-forum.io/index.php', author_email='[email protected]', )Command line i use cmder,just the same in cmd
# Install wheel C:\Python38\Scripts λ pip install wheel Collecting wheel Using cached https://files.pythonhosted.org/packages/00/83/...c9/wheel-0.33.6-py2.py3-none-any.whl Installing collected packages: wheel Successfully installed wheel-0.33.6 # Make the wheel C:\Python38\Scripts λ py -3.8 setup.py bdist_wheel .... adding 'vvsearch-1.0.dist-info/top_level.txt' adding 'vvsearch-1.0.dist-info/RECORD' removing build\bdist.win32\wheel # Now the wheel is in dist folder,install with pip C:\Python38\Scripts\dist λ py -3.8 -m pip install vvsearch-1.0-py3-none-any.whl Processing c:\python38\scripts\dist\vvsearch-1.0-py3-none-any.whl Installing collected packages: vvsearch Successfully installed vvsearch-1.0 # Test that it work C:\Python38 λ python Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import vvsearch >>> >>> vvsearch.search4letters('hitch-hiker', 'aeiou') {'e', 'i'} >>> vvsearch.search4letters('hello', 'aeiou') {'e', 'o'} >>> exit()So now it install to 3.8.
This is just the same way you make it if want to use PyPi.
PyPi is a central disruption of
wheels
.After upload wheel to PyPi your wheel get shorter name.
# This can share with other eg usb stick,private host of wheel on web pip install vvsearch-1.0-py3-none-any.whl # PyPi share with other in an easier way pip install vvsearchIt's just the same
wheel
PyPi disturbed it central.