pypa / flit

Simplified packaging of Python modules
https://flit.pypa.io/
BSD 3-Clause "New" or "Revised" License
2.16k stars 134 forks source link

Error with console script #124

Open ethanhs opened 7 years ago

ethanhs commented 7 years ago

Hi! I was just trying flit for packaging up a simple file. I ran flit install. It created a console executable (clinic.exe) however, the clinic script is not working.

This is on Windows 10 Python 3.6.2 x64.

My flit.ini

[metadata]
module=clinic
author=Ethan Smith
author-email=ethan@ethanhs.me
home-page=http://github.com/ethanhs/clinic
requires-python= ~=3.6
[scripts]
clinic=clinic.__main__:main

When run clinic or clinic.exe I get

Error:
Can't extract file type for file 'C:\\Python36\\Scripts\\clinic'

No such file exists. It seems it is looking in the wrong location on install?

takluyver commented 7 years ago

When you flit install, it's actually producing a temporary wheel and asking pip to install that. So first, do you get the same result if you flit wheel and then pip install dist/wheel...whl (substitute the filename it creates in there).

If you do, make sure that pip and flit are both up to date. If so, we need to work out if flit is generating the wheel wrong or pip is installing it wrong.

ethanhs commented 7 years ago

I just checked and installing from the wheel also does not work. I've attached the wheel (zipped). I am using wheel==0.29 and pip==9.0.1.

clinic-0.0.1-py3-none-any.zip

takluyver commented 7 years ago

The wheel looks correct as far as I can see, and I can install it OK on both my Linux computer and a Windows computer. So I think this might be a problem with pip, though I don't know how.