Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix packaging for setuptools>=41.4 #163

Merged
merged 1 commit into from
Dec 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include README.rst AUTHORS LICENSE CHANGES
include setuputils.py
include astor/VERSION
recursive-include tests *.py
1 change: 1 addition & 0 deletions astor/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.8.0
5 changes: 4 additions & 1 deletion astor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

"""

import os
import warnings

from .code_gen import SourceGenerator, to_source # NOQA
Expand All @@ -19,7 +20,9 @@
from .op_util import symbol_data # NOQA
from .tree_walk import TreeWalk # NOQA

__version__ = '0.8.0'
ROOT = os.path.dirname(__file__)
with open(os.path.join(ROOT, 'VERSION')) as version_file:
__version__ = version_file.read().strip()

parse_file = code_to_ast.parse_file

Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = astor
description = Read/rewrite/write Python ASTs
long_description = file:README.rst
version = file: astor/VERSION
author = Patrick Maupin
author_email = pmaupin@gmail.com
platforms = Independent
Expand Down Expand Up @@ -40,7 +41,7 @@ test_suite = nose.collector
[options.packages.find]
exclude = tests

[wheel]
[bdist_wheel]
universal = 1

[build-system]
Expand Down
16 changes: 1 addition & 15 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
import os
import sys

from setuptools import setup
from setuptools.config import read_configuration

from setuputils import find_version


def here(*paths):
return os.path.join(os.path.dirname(__file__), *paths)

config = read_configuration(here('setup.cfg'))
config['metadata']['version'] = find_version(here('astor', '__init__.py'))
config['options'].update(config['metadata'])

setup(**config['options'])
setup()