Skip to content

Commit

Permalink
Fix setup.py reading setup.cfg manually (fixes kaitai-io#20)
Browse files Browse the repository at this point in the history
Reading setup.cfg manually is not supported by setuptools and causes
errors with some setup.cfg features (see pypa/setuptools#1869).
The supported way to use setup.cfg is to call setup() with no arguments
and let setuptools read and parse setup.cfg itself.
  • Loading branch information
dgelessus committed Jun 30, 2020
1 parent 9e50744 commit 8f75057
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-
from setuptools import setup
from setuptools.config import read_configuration
from pathlib import Path

cfg = read_configuration(str(Path(__file__).parent / 'setup.cfg'))
#print(cfg)
cfg["options"].update(cfg["metadata"])
cfg = cfg["options"]
setup(**cfg)
setup()

0 comments on commit 8f75057

Please sign in to comment.