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

Create wheels for Spyder #2574

Closed
stonebig opened this issue Jul 31, 2015 · 5 comments · Fixed by #2774
Closed

Create wheels for Spyder #2574

stonebig opened this issue Jul 31, 2015 · 5 comments · Fixed by #2774

Comments

@stonebig
Copy link
Contributor

I would like to be able to create a wheel from spyder master git.

It should be possible, as Christoph Gohlke does it (http://www.lfd.uci.edu/~gohlke/pythonlibs/#spyder)

Unfortunately, the default spyder tree doesn't permit.

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: invalid command 'bdist_wheel'

```
```
@ccordoba12 ccordoba12 added this to the v3.0 milestone Jul 31, 2015
@ccordoba12 ccordoba12 changed the title wheel package format Create wheels for Spyder Jul 31, 2015
@ccordoba12
Copy link
Member

Maybe that's because we're using distutils instead of setuptools in setup.py. I'll look into it.

@stonebig
Copy link
Contributor Author

thanks.

@stonebig
Copy link
Contributor Author

stonebig commented Aug 6, 2015

The "basic" wheel method suggested by Christoph Gohlke is to add an import setuptools at beginning.

the wheel creation nevertheless fails on my Windows because of über-tricky colorama error messages in "\ansitowin32.py". EDIT: no bug if I build with a Python 2.7 environnement

Spyder-ide project providing a wheel on its betas would definitely help

@stonebig
Copy link
Contributor Author

stonebig commented Aug 8, 2015

Failure when trying to build a Spyder wheel in a Python 3.4 Windows environnement (no failure on 2.7)

copying scripts\spyder.bat -> build\scripts-3.4
running build_doc
Traceback (most recent call last):
  File "setup.py", line 272, in <module>
    cmdclass=CMDCLASS)
  File "\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)  File "\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()  File "\lib\site-packages\wheel\bdist_wheel.py", line 175, in run
    self.run_command('build')
  File "\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "\lib\distutils\command\build.py", line 126, in run
    self.run_command(cmd_name)
  File "\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 148, in run
    setup_command.BuildDoc.run(self)
  File "\lib\site-packages\sphinx\setup_command.py", line 141, in run
    if not color_terminal():
  File "\lib\site-packages\sphinx\util\console.py", line 58, in color_terminal
    colorama.init()
  File "\lib\site-packages\colorama\initialise.py", line 31, in init
    wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
  File "\lib\site-packages\colorama\initialise.py", line 61, in wrap_stream
    convert=convert, strip=strip, autoreset=autoreset)
  File "\lib\site-packages\colorama\ansitowin32.py", line 68, in __init__
    convert = on_windows and not wrapped.closed and not on_emulated_windows and
is_a_tty(wrapped)
ValueError: underlying buffer has been detached


@ccordoba12
Copy link
Member

As I said, we need to move from distutils to setuptools for this to work correctly. And that is not only a matter of adding

import setuptools

to our setup.py script. What it really means is to rewrite setup.py in terms of setuptools.

However, I think you can use pip to auto-generate a wheel when you do

pip install .

(at least that gives me a wheel on Linux).

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

Successfully merging a pull request may close this issue.

2 participants