-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bugfix/quote
- Loading branch information
Showing
5 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed an issue in the AST parser which caused failures when parsing ``setup.py`` files with assignments (e.g. ``variable = some_value``) to the same name more than once, followed by operations on those variables (e.g. ``new_value = variable + other_variable``). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
tests/fixtures/setup_py/package_with_repeated_assignments/setup.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
|
||
from setuptools import find_packages, setup | ||
|
||
thisdir = os.path.abspath(os.path.dirname(__file__)) | ||
version = os.environ["PACKAGE_VERSION"] | ||
|
||
|
||
def my_function(other_list): | ||
entry = {"key": [{"matches": ["string 1", "string 2", "some_string"]}]} | ||
matches = entry["key"][0]["matches"] | ||
matches = [x for x in matches if "some_string" not in x] | ||
entry["key"][0]["matches"] = matches + other_list | ||
|
||
|
||
setup( | ||
name="test_package_with_repeated_assignments", | ||
version=version, | ||
description="Test package with repeated assignments and version from environment", | ||
long_description="This is a package", | ||
install_requires=["six",], | ||
package_dir={"": "src"}, | ||
packages=find_packages("src"), | ||
include_package_data=True, | ||
zip_safe=False, | ||
) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters