Commit 7c2c7a81 authored by eric pellegrini's avatar eric pellegrini
Browse files

addded setup.py file

parent 52c7f45b
import glob
import os
name = "packman"
# Read the package metadata first
pkginfo = {}
exec(open("src/packman/__pkginfo__.py","r").read(),{},pkginfo)
from setuptools import find_packages, setup
# Set up the sphinx documentation command
cmdclass = {}
command_options = {}
try:
from sphinx.setup_command import BuildDoc
except ImportError:
pass
else:
cmdclass = {'build_sphinx': BuildDoc}
command_options["build_sphinx"] = {}
command_options["build_sphinx"]["project"] = ("setup.py",name)
command_options["build_sphinx"]["version"] = ("setup.py",pkginfo["__version__"])
command_options["build_sphinx"]["source_dir"] = ('setup.py', 'docs')
# Add additional information to pkginfo
pkginfo["__classifiers__"] = ["Programming Language :: Python :: 3","License :: OSI Approved :: MIT License","Operating System :: OS Independent"]
pkginfo["__long_description_content_type__"] ="text/markdown"
with open("README.rst","r") as f:
pkginfo["__long_description__"] = f.read()
packages = find_packages("src")
# Copy the scripts
scripts_dir = "scripts"
scripts = glob.glob(os.path.join(scripts_dir,'*'))
setup(name = name,
version = pkginfo["__version__"],
description = pkginfo["__description__"],
long_description = pkginfo["__long_description__"],
long_description_content_type = pkginfo["__long_description_content_type__"],
author = pkginfo["__author__"],
author_email = pkginfo["__author_email__"],
maintainer = pkginfo["__maintainer__"],
maintainer_email = pkginfo["__maintainer_email__"],
url = pkginfo["__url__"],
license = pkginfo["__license__"],
classifiers = pkginfo["__classifiers__"],
packages = packages,
package_dir = {"" : "src"},
platforms = ['Unix','Windows'],
install_requires = ["pyyaml","Jinja2"],
cmdclass = cmdclass,
scripts = scripts,
command_options = command_options,
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment