git-imerge/setup.py
Jon Dufresne 1c14b8a22f Add setup.py script to build the package using setuptools
Setuptools is a fully-featured, actively-maintained, and stable library
designed to facilitate packaging Python projects. It is the standard
library used to create Python packages by the community.

The setup.py script allows building an sdist package and a wheel
package. Installing the package with setuptools installs a gitimerge.py
module and a git-imerge command line script.

A tox configuration was added to automate testing in a virtualenv.

The README has been updated with new installation and testing instructions.
2019-06-10 18:39:26 -07:00

45 lines
1.4 KiB
Python

import errno
import subprocess
from setuptools import setup
data_files = []
try:
completionsdir = subprocess.check_output(
["pkg-config", "--variable=completionsdir", "bash-completion"]
)
except OSError as e:
if e.errno != errno.ENOENT:
raise
else:
completionsdir = completionsdir.strip().decode('utf-8')
if completionsdir:
data_files.append((completionsdir, ["completions/git-imerge"]))
setup(
name="gitimerge",
description="Incremental merge for git",
url="https://github.com/mhagger/git-imerge",
author="Michael Haggerty",
author_email="mhagger@alum.mit.edu",
license="GPLv2+",
version="1.1.0",
py_modules=["gitimerge"],
data_files=data_files,
entry_points={"console_scripts": ["git-imerge = gitimerge:climain"]},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
)