tobimensch / cli2man

Converts the help message of a program into a manpage
25 stars 8 forks source link

Can't install via pip on windows #4

Closed MCGallaspy closed 8 years ago

MCGallaspy commented 8 years ago

On Windows 8, using python 2.7.10 and pip 7.1.2, I get the following error:

C:\Python27\Scripts>pip.exe install cli2man
Collecting cli2man
  Downloading cli2man-0.2.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): docopt in c:\python27\
lib\site-packages (from cli2man)
Building wheels for collected packages: cli2man
  Running setup.py bdist_wheel for cli2man
  Complete output from command C:\Python27\python.exe -c "import setuptools;__fi
le__='c:\\users\\mike\\appdata\\local\\temp\\pip-build-o1d5xd\\cli2man\\setup.py
';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
bdist_wheel -d c:\users\mike\appdata\local\temp\tmpb4eteupip-wheel-:
  running bdist_wheel
  running build
  running build_scripts
  creating build
  creating build\scripts-2.7
  copying and adjusting cli2man -> build\scripts-2.7
  installing to build\bdist.win32\wheel
  running install
  running install_data
  creating build\bdist.win32
  creating build\bdist.win32\wheel
  creating build\bdist.win32\wheel\cli2man-0.2.2.data
  creating build\bdist.win32\wheel\cli2man-0.2.2.data\data
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "c:\users\mike\appdata\local\temp\pip-build-o1d5xd\cli2man\setup.py", l
ine 13, in <module>
      data_files=[('/usr/share/man/man1/', ['cli2man.1.gz'])]
    File "C:\Python27\lib\distutils\core.py", line 151, in setup
      dist.run_commands()
    File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Python27\lib\site-packages\wheel\bdist_wheel.py", line 211, in run
      self.run_command('install')
    File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 61,
 in run
      return orig.install.run(self)
    File "C:\Python27\lib\distutils\command\install.py", line 575, in run
      self.run_command(cmd_name)
    File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Python27\lib\distutils\command\install_data.py", line 58, in run
      dir = convert_path(f[0])
    File "C:\Python27\lib\distutils\util.py", line 124, in convert_path
      raise ValueError, "path '%s' cannot be absolute" % pathname
  ValueError: path '/usr/share/man/man1/' cannot be absolute

  ----------------------------------------
  Failed building wheel for cli2man
Failed to build cli2man
Installing collected packages: cli2man
  Running setup.py install for cli2man
    Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\mike\\appdata\\local\\temp\\pip-build-o1d5xd\\cli2m
an\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().repl
ace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\mike\appdata\lo
cal\temp\pip-mrwdan-record\install-record.txt --single-version-externally-manage
d --compile:
    running install
    running build
    running build_scripts
    running install_data
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\mike\appdata\local\temp\pip-build-o1d5xd\cli2man\setup.py",
 line 13, in <module>
        data_files=[('/usr/share/man/man1/', ['cli2man.1.gz'])]
      File "C:\Python27\lib\distutils\core.py", line 151, in setup
        dist.run_commands()
      File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 6
1, in run
        return orig.install.run(self)
      File "C:\Python27\lib\distutils\command\install.py", line 575, in run
        self.run_command(cmd_name)
      File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
        cmd_obj.run()
      File "C:\Python27\lib\distutils\command\install_data.py", line 58, in run
        dir = convert_path(f[0])
      File "C:\Python27\lib\distutils\util.py", line 124, in convert_path
        raise ValueError, "path '%s' cannot be absolute" % pathname
    ValueError: path '/usr/share/man/man1/' cannot be absolute

It doesn't play nicely :(

I don't know much about this project (a coworker wished to add it to our project's requirements, and we develop on a variety of OSes) but if it's not meant to work on Windows can you mention that in the description?

benjaoming commented 8 years ago

Thanks for noting this, I'm gonna make an amendment to the PR #3 that's tracking the branch that's being released on PyPi for now, until @tobimensch wants to merge stuff.

benjaoming commented 8 years ago

@MCGallaspy the latest version doesn't try to install a manfile anymore, I don't think that behaviour is warranted in a PyPi package: I've failed to find a cross-platform pattern for it.

b7f122c

tobimensch commented 8 years ago

@benjaoming ... it's not that I don't want to merge stuff, it's that other life issues currently have priority. When I'm back to hacking I'm going to improve cli2man and merge stuff, meanwhile I think it's nice that people like you bother with improving/fixing stuff and using cli2man. I hope that cli2man generally works for some people. I'd like to read some examples where people succeeded creating nice man pages (or not).

benjaoming commented 8 years ago

Looking forward to it @tobimensch -- I think it worked very well -- there are a few beauty issues. I think the main is "BSD General Commands Manual" in the top :)

But having a seamless docopt -> manpage generator is so nice!!

I just noticed that pandoc also does manpages, any experience with this?