Skip to content

Commit

Permalink
BF: Read package metadata directly from setup.cfg
Browse files Browse the repository at this point in the history
The distribution object does not seem to see it (at least not
under all circumstances).
  • Loading branch information
mih committed Jun 15, 2020
1 parent fd99b4e commit 023a1b7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@

from distutils.core import Command
from distutils.errors import DistutilsOptionError
from distutils.version import LooseVersion
from genericpath import exists
from os import linesep, makedirs
from os.path import dirname, join as opj, sep as pathsep, splitext, isabs
from setuptools import findall, find_packages, setup

from . import formatters as fmt

from os.path import (
dirname,
join as opj,
)
from setuptools.config import read_configuration

import versioneer

Expand Down Expand Up @@ -129,9 +126,12 @@ def run(self):
#appname = self._parser.prog
appname = 'datalad'

cfg = read_configuration(
opj(dirname(dirname(__file__)), 'setup.cfg'))['metadata']

sections = {
'Authors': """{0} is developed by {1} <{2}>.""".format(
appname, dist.get_author(), dist.get_author_email()),
appname, cfg['author'], cfg['author_email']),
}

for cls, opath, ext in ((fmt.ManPageFormatter, self.manpath, '1'),
Expand Down

0 comments on commit 023a1b7

Please sign in to comment.