-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds test for cross index dependencies
- Loading branch information
Showing
10 changed files
with
237 additions
and
114 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
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,2 @@ | ||
[build-system] | ||
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm>=3.3.1"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import ast | ||
import os | ||
|
||
from setuptools import setup, find_packages | ||
|
||
ROOT = os.path.dirname(__file__) | ||
|
||
PACKAGE_NAME = "private_package_a" | ||
|
||
VERSION = None | ||
|
||
with open(os.path.join(ROOT, "src", PACKAGE_NAME.replace("-", "_"), "__init__.py")) as f: | ||
for line in f: | ||
if line.startswith("__version__ = "): | ||
VERSION = ast.literal_eval(line[len("__version__ = ") :].strip()) | ||
break | ||
if VERSION is None: | ||
raise OSError("failed to read version") | ||
|
||
setup( | ||
name=PACKAGE_NAME, | ||
# These really don't work. | ||
package_dir={"": "src"}, | ||
packages=find_packages("src"), | ||
# I don't know how to specify an empty key in setup.cfg. | ||
package_data={ | ||
"": ["LICENSE*", "README*"], | ||
}, | ||
install_requires=[ | ||
"six>=0.0.1", | ||
"private-package-b>=0.0.1", | ||
], | ||
description="A fake python package.", | ||
author="Dan Ryan", | ||
author_email="[email protected]", | ||
url="https://github.com/sarugaku/legacy_backend_package", | ||
classifiers=[ | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python", | ||
], | ||
setup_requires=["setuptools-git-versioning"], | ||
) |
1 change: 1 addition & 0 deletions
1
tests/fixtures/private-package-a/src/private_package_a/__init__.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 @@ | ||
__version__ = "0.0.1" |
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,2 @@ | ||
[build-system] | ||
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm>=3.3.1"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import ast | ||
import os | ||
|
||
from setuptools import setup, find_packages | ||
|
||
ROOT = os.path.dirname(__file__) | ||
|
||
PACKAGE_NAME = "private_package_b" | ||
|
||
VERSION = None | ||
|
||
with open(os.path.join(ROOT, "src", PACKAGE_NAME.replace("-", "_"), "__init__.py")) as f: | ||
for line in f: | ||
if line.startswith("__version__ = "): | ||
VERSION = ast.literal_eval(line[len("__version__ = ") :].strip()) | ||
break | ||
if VERSION is None: | ||
raise OSError("failed to read version") | ||
|
||
setup( | ||
name=PACKAGE_NAME, | ||
# These really don't work. | ||
package_dir={"": "src"}, | ||
packages=find_packages("src"), | ||
# I don't know how to specify an empty key in setup.cfg. | ||
package_data={ | ||
"": ["LICENSE*", "README*"], | ||
}, | ||
install_requires=[], | ||
description="A fake python package.", | ||
author="Dan Ryan", | ||
author_email="[email protected]", | ||
url="https://github.com/sarugaku/legacy_backend_package", | ||
classifiers=[ | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python", | ||
], | ||
setup_requires=["setuptools-git-versioning"], | ||
) |
1 change: 1 addition & 0 deletions
1
tests/fixtures/private-package-b/src/private_package_a/__init__.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 @@ | ||
__version__ = "0.0.1" |
Oops, something went wrong.
temporarily removed this, it needs to be added back in if this branch is going to go somewhere