Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sriram-mv opened this issue Nov 1, 2018 · 22 comments · Fixed by #622
Closed

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

sriram-mv opened this issue Nov 1, 2018 · 22 comments · Fixed by #622

Comments

@sriram-mv
Copy link

sriram-mv commented Nov 1, 2018

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.

@chadrik
Copy link
Contributor

chadrik commented Jan 7, 2019

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

@demianzhang
Copy link

rm the ._pth file in python installed file

@gaborbernat
Copy link

Plus one on this!

@WSLUser
Copy link

WSLUser commented May 17, 2019

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

@WSLUser
Copy link

WSLUser commented May 17, 2019

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

@WSLUser
Copy link

WSLUser commented May 17, 2019

Also related: Need an egg file.

@WSLUser
Copy link

WSLUser commented May 29, 2019

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.

@groodt
Copy link
Contributor

groodt commented Dec 21, 2019

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

@johnthagen
Copy link

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

@groodt
Copy link
Contributor

groodt commented Jun 8, 2020

@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?

@sfdye sfdye pinned this issue Jun 13, 2020
@odidev
Copy link

odidev commented Sep 28, 2020

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.

@MRsoymilk
Copy link

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.

@sfdye
Copy link
Collaborator

sfdye commented Nov 24, 2020

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.

@zachary-zheng
Copy link

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.

@yutax77
Copy link

yutax77 commented Jan 25, 2022

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?

@lurj7988
Copy link

lurj7988 commented Feb 1, 2023

It still doesn't works on Windows.

@PauloCarvalhoRJ
Copy link

PauloCarvalhoRJ commented Jun 28, 2023

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.

@PauloCarvalhoRJ
Copy link

PauloCarvalhoRJ commented Jun 28, 2023

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.

@groodt
Copy link
Contributor

groodt commented Aug 5, 2023

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.

@petsuter
Copy link

petsuter commented Aug 5, 2023

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()

@groodt
Copy link
Contributor

groodt commented Aug 13, 2023

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

@J3ronimo
Copy link

J3ronimo commented Oct 6, 2023

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.