-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow specifying a dist-name that doesn't match the module name
- Loading branch information
Showing
4 changed files
with
30 additions
and
2 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
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,6 @@ | ||
[metadata] | ||
module=package1 | ||
author=Sir Robin | ||
author-email=robin@camelot.uk | ||
home-page=http://github.com/sirrobin/package1 | ||
dist-name=packagedist1 |
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 |
---|---|---|
@@ -1,15 +1,29 @@ | ||
import pathlib | ||
import shutil | ||
|
||
from testpath import assert_isfile | ||
|
||
from flit.wheel import WheelBuilder | ||
|
||
samples_dir = pathlib.Path(__file__).parent / 'samples' | ||
|
||
def clear_samples_dist(): | ||
try: | ||
shutil.rmtree(str(samples_dir / 'dist')) | ||
except FileNotFoundError: | ||
pass | ||
|
||
def test_wheel_module(): | ||
clear_samples_dist() | ||
WheelBuilder(samples_dir / 'module1-pkg.ini').build() | ||
assert_isfile(str(samples_dir / 'dist/module1-0.1-py2.py3-none-any.whl')) | ||
|
||
def test_wheel_package(): | ||
clear_samples_dist() | ||
WheelBuilder(samples_dir / 'package1-pkg.ini').build() | ||
assert_isfile(str(samples_dir / 'dist/package1-0.1-py2.py3-none-any.whl')) | ||
|
||
def test_dist_name(): | ||
clear_samples_dist() | ||
WheelBuilder(samples_dir / 'altdistname.ini').build() | ||
assert_isfile(str(samples_dir / 'dist/packagedist1-0.1-py2.py3-none-any.whl')) |