#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import re
import sys
from setuptools import setup


def get_version():
    filename = os.path.join(os.path.dirname(__file__), 'hashsum.py')
    with open(filename) as fd:
        data = fd.read()
    mobj = re.search(
        '^VERSION\s*=\s*(?P<quote>[\'"])(?P<version>[^\'"]+)(?P=quote)',
        data,
        re.MULTILINE)
    return mobj.group('version')


install_requires = ['enum34'] if sys.version_info[:2] < (3, 4) else []


setup(
    name='hashsum',
    version=get_version(),
    description='Python drop-in replacement for md5sum and co.',
    # long_description='',
    url='https://github.com/avalentino/hashsum',
    author='Antonio Valentino',
    author_email='antonio.valentino@tiscli.it',
    license='BSD',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: End Users/Desktop',
        'Topic :: Utilities',
        'License :: OSI Approved :: BSD License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.1',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
    ],
    keywords='checksum hash',
    py_modules=['hashsum'],
    install_requires=install_requires,
    # extras_require={},
    # package_data={},
    # data_files=[],
    entry_points={
        'console_scripts': [
            'hashsum=hashsum:main',
        ],
    },
)

@@ -484,16 +484,200 @@
 else %5B%5D%0A
+if not sys.platform.startswith('win'):%0A    data_files = %5B%0A        ('share/man/man1', %5B'man/hashsum.1'%5D),%0A        # ('share/locale/it', %5B'po/it.mo'%5D),%0A    %5D%0Aelse:%0A    data_files = None%0A
 %0A%0Asetup(
@@ -1710,18 +1710,16 @@
 =%7B%7D,%0A   
- #
  data_fi
@@ -1722,18 +1722,26 @@
 a_files=
-%5B%5D
+data_files
 ,%0A    en

Install the man page on non-windows systems