Merge branch 'kurtmckee/support-python-3.12'
[dotbot.git] / setup.py
blob06bc7bf4be743ecc6fb607bc3e7d1c95c80dbf12
1 import re
2 from os import path
4 from setuptools import find_packages, setup
6 here = path.dirname(__file__)
9 with open(path.join(here, "README.md"), encoding="utf-8") as f:
10 long_description = f.read()
13 def read(*names, **kwargs):
14 with open(path.join(here, *names), encoding=kwargs.get("encoding", "utf8")) as fp:
15 return fp.read()
18 def find_version(*file_paths):
19 version_file = read(*file_paths)
20 version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
21 if version_match:
22 return version_match.group(1)
23 raise RuntimeError("Unable to find version string.")
26 setup(
27 name="dotbot",
28 version=find_version("dotbot", "__init__.py"),
29 description="A tool that bootstraps your dotfiles",
30 long_description=long_description,
31 long_description_content_type="text/markdown",
32 url="https://github.com/anishathalye/dotbot",
33 author="Anish Athalye",
34 author_email="me@anishathalye.com",
35 license="MIT",
36 classifiers=[
37 "Development Status :: 5 - Production/Stable",
38 "Intended Audience :: Developers",
39 "License :: OSI Approved :: MIT License",
40 "Programming Language :: Python :: 3",
41 "Programming Language :: Python :: 3.6",
42 "Programming Language :: Python :: 3.7",
43 "Programming Language :: Python :: 3.8",
44 "Programming Language :: Python :: 3.9",
45 "Programming Language :: Python :: 3.10",
46 "Programming Language :: Python :: 3.11",
47 "Programming Language :: Python :: 3.12",
48 "Topic :: Utilities",
50 keywords="dotfiles",
51 packages=find_packages(),
52 setup_requires=[
53 "setuptools>=38.6.0",
54 "wheel>=0.31.0",
56 install_requires=[
57 "PyYAML>=6.0.1,<7",
59 extras_require={
60 "dev": {
61 "pytest",
62 "tox",
65 # To provide executable scripts, use entry points in preference to the
66 # "scripts" keyword. Entry points provide cross-platform support and allow
67 # pip to create the appropriate form of executable for the target platform.
68 entry_points={
69 "console_scripts": [
70 "dotbot=dotbot:main",