Skip to content

Can a wheel be built and uploaded to pypi along with a tarball #411

Description

@sriram-mv

Under https://pypi.org/project/future/#files. I see that there is a tar gz file.

Having a wheel built and uploaded would also help.

Relative imports in setup.py would make execution of it complain with modules src.future not being found.

/some/different/path/python setup.py install

Error:

import src.future
ModuleNotFoundError: No module named 'src'

I found this issue on windows, and got around it by manually building a wheel myself, and installing the wheel through pip.

Activity

  1. chadrik commented on Jan 7, 2019

    @chadrik
    Contributor

    +1
    It's crazy that a project whose purpose is to aid users in modernizing their python code is stuck in the stone age! :)

  2. demianzhang commented on Mar 2, 2019

    @demianzhang

    rm the ._pth file in python installed file

  3. gaborbernat commented on May 17, 2019

    @gaborbernat

    Plus one on this!

  4. WSLUser commented on May 17, 2019

    @WSLUser

    It think this should be high priority to get updates including --pre (installs from master branch) easily with pip.

  5. WSLUser commented on May 17, 2019

    @WSLUser

    @thesriram Could you please provide the wheel you created here as well as submitting PR to add the wheel to the repo?

  6. WSLUser commented on May 17, 2019

    @WSLUser

    Also related: Need an egg file.

  7. WSLUser commented on May 29, 2019

    @WSLUser

    Looks like a wheel will be auto-created if you're running Miniconda (or it's bloated brother) when installing with pip (or conda). But it should already exist out of box along with the egg.

  8. groodt commented on Dec 21, 2019

    @groodt
    Contributor

    I've created this PR, which if merged, will publish a wheel (non-universal) when a release is cut: #536

    Future enhancements could be to setup Travis or some other CI system to publish wheels for different Python versions. Or some Docker containers to publish Python2 and Python3 versions. It seems that the wheel is not a "universal" wheel, because it is doing some 2to3 style stuff and the "universal" wheel configuration has been removed:
    #400

  9. johnthagen commented on Jun 8, 2020

    @johnthagen

    future is currently the number one most downloaded package on PyPI missing a wheel: https://pythonwheels.com/

  10. groodt commented on Jun 8, 2020

    @groodt
    Contributor

    @johnthagen Yes. There is also an open PR with a simple change that would allow wheels to be published. #536

    The project is obviously not very active anymore, but there were commits in Feb 2020.

    @jmadler Is there any interest in publishing a Wheel?

  11. pinned this issue on Jun 13, 2020
  12. odidev commented on Sep 28, 2020

    @odidev

    As per above discussion, we know that python-future doesn't have wheel for aarch64/x86 on PyPI repository. So, while installing python-future via pip on aarch64/x86 machine, pip builds the source code resulting in it takes more time to install python-future. Making wheel available for aarch64/x86 will benefit aarch64/x86 users by minimizing python-future installation time. We can release the wheel using CI/CD tools such as Travis-ci, circle-ci, azure-pipeline etc...

    @sfdye @jmadler, please let me know if I can help you building wheel/uploading to PyPI repository. I am curious to make python-future wheel available for aarch64. It will be a great opportunity for me to work with you.

  13. MRsoymilk commented on Nov 22, 2020

    @MRsoymilk

    I got the same problem on my Windows machine: ModuleNotFoundError: No module named 'src'

    I download the tarball and add:

    sys.path.append('C:\\Users\\milk\\Desktop\\future-0.18.2')

    in setup.py, just add the path to the future file, then it works! This really bother me for a long time.

  14. sfdye commented on Nov 24, 2020

    @sfdye
    Collaborator

    Hi all, to test some theories, I've uploaded py27 and py36 pure python wheels for v0.18.0 (to avoid breaking latest tag)

    https://pypi.org/project/future/0.18.0/#files

    $ pip install 'future==0.18.0'
    Collecting future==0.18.0
      Downloading future-0.18.0-cp36-none-any.whl (490 kB)
         |████████████████████████████████| 490 kB 1.9 MB/s
    Installing collected packages: future
      Attempting uninstall: future
        Found existing installation: future 0.18.1
        Uninstalling future-0.18.1:
          Successfully uninstalled future-0.18.1
    Successfully installed future-0.18.0
    

    Please have a try and let me know if it works

    I will be very interested to know if it works on Windows.

  15. zachary-zheng commented on Feb 18, 2021

    @zachary-zheng

    I got the same problem on my Windows machine: ModuleNotFoundError: No module named 'src'

    I download the tarball and add:

    sys.path.append('C:\\Users\\milk\\Desktop\\future-0.18.2')

    in setup.py, just add the path to the future file, then it works! This really bother me for a long time.

    It really helps, thanks a lot.

  16. yutax77 commented on Jan 25, 2022

    @yutax77

    I got the same problem on my Windows machine: ModuleNotFoundError: No module named 'src'

    I download the tarball and add:

    sys.path.append('C:\\Users\\milk\\Desktop\\future-0.18.2')

    in setup.py, just add the path to the future file, then it works! This really bother me for a long time.

    This also works fine.

    sys.path.append('')

    Isn't this an environment-independent method?

  17. lurj7988 commented on Feb 1, 2023

    @lurj7988

    It still doesn't works on Windows.

  18. PauloCarvalhoRJ commented on Jun 28, 2023

    @PauloCarvalhoRJ

    I got the same problem on my Windows machine: ModuleNotFoundError: No module named 'src'

    I download the tarball and add:

    sys.path.append('C:\\Users\\milk\\Desktop\\future-0.18.2')

    in setup.py, just add the path to the future file, then it works! This really bother me for a long time.

    Hello,

    That's interesting. But, what should one do when setup.py exists only in a temporary cache? This way the script runs in a single shot and gets deleted, so it cannot be edited. I mean, is there an alternative way to achieve the same effect without editing setup.py?

    thanks,

    PC

    Edit: running Python 3.7.0.

  19. PauloCarvalhoRJ commented on Jun 28, 2023

    @PauloCarvalhoRJ

    I got the same problem on my Windows machine: ModuleNotFoundError: No module named 'src'
    I download the tarball and add:

    sys.path.append('C:\\Users\\milk\\Desktop\\future-0.18.2')

    in setup.py, just add the path to the future file, then it works! This really bother me for a long time.

    Hello,

    That's interesting. But, what should one do when setup.py exists only in a temporary cache? This way the script runs in a single shot and gets deleted, so it cannot be edited. I mean, is there an alternative way to achieve the same effect without editing setup.py?

    thanks,

    PC

    Edit: running Python 3.7.0.

    Added the directory where I extracted the tarball (e.g. C:\\Users\\milk\\Desktop\\future-0.18.2) to the pythonNN._pth file located in Python's installation directory. It worked for me.

  20. groodt commented on Aug 5, 2023

    @groodt
    Contributor

    Can I ask for clarification to the Windows users please?

    Are you experiencing installation issues with the sdist version 0.18.3 of this package?

    If so, do you see the same issue with the 0.18.0 wheel that has been published?

    To the maintainers, thank you for supporting such a load-bearing package over the years. Is there much maintenance activity going on these days? Is there any appetite to trying this wheel experiment again? This package is still seeing a large number of downloads, so publishing a wheel will help a few CI systems and installers resolve and install packages marginally more efficiently than they would otherwise.

  21. petsuter commented on Aug 5, 2023

    @petsuter

    Both the wheel and the sdist work on Windows:

    C:\> py -3.6 -m pip install future==0.18.0
    Collecting future==0.18.0
      Downloading https://files.pythonhosted.org/packages/9e/cf/95b17d4430942dbf291fa5411d8189374a2e6dba91d9ef077e7fb8e869bc/future-0.18.0-cp36-none-any.whl (490kB)
        100% |████████████████████████████████| 491kB 6.2MB/s
    Installing collected packages: future
    Successfully installed future-0.18.0
    
    C:\> py -3.6
    Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import future
    >>> future.__version__
    '0.18.0'
    >>> exit()
    
    C:\>py -3.11 -m pip install future==0.18.0
    Collecting future==0.18.0
      Downloading future-0.18.0.tar.gz (830 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 830.0/830.0 kB 5.2 MB/s eta 0:00:00
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Building wheels for collected packages: future
      Building wheel for future (pyproject.toml) ... done
      Created wheel for future: filename=future-0.18.0-py3-none-any.whl size=490442 sha256=5d684a4e1af7de80995a1a2e8a0bc00e586c265de89ed49eec44abfec4bf7f31
    Successfully built future
    Installing collected packages: future
    Successfully installed future-0.18.0
    
    C:\> py -3.11
    Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import future
    >>> future.__version__
    '0.18.0'
    >>> exit()
    
    C:\> py -3.11 -m pip install future==0.18.3
    Collecting future==0.18.3
      Downloading future-0.18.3.tar.gz (840 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 840.9/840.9 kB 8.8 MB/s eta 0:00:00
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Building wheels for collected packages: future
      Building wheel for future (pyproject.toml) ... done
      Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492053 sha256=a7119373837a7317f164e864b9010f3e4cb789034efa5ba6ece481c403b1a4f9
    Successfully built future
    Installing collected packages: future
      Attempting uninstall: future
        Found existing installation: future 0.18.0
        Uninstalling future-0.18.0:
          Successfully uninstalled future-0.18.0
    Successfully installed future-0.18.3
    
    C:\> py -3.11
    Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import future
    >>> future.__version__
    '0.18.3'
    >>> exit()
    
  22. groodt commented on Aug 13, 2023

    @groodt
    Contributor

    I've created a PR that I believe addresses this issue: #622

  23. J3ronimo commented on Oct 6, 2023

    @J3ronimo

    As a side note, I got pip install future working on Windows by adding the --use-pep517 flag, which (from my understanding) makes pip

    • convert the setup.py currently contained in the tarball into a pyproject.toml
    • create a wheel from that into pip's cache files (future-0.18.3-py3-none-any.whl)
    • install that

    Also helps with pipx by passing --pip-args="--use-pep517" to pipx install when installing an app that has future as a dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions