Skip to content

Commit a4f8f1b

Browse files
committed
Use Flit to include data file in wheel
Signed-off-by: Jay Vercellone <juanjov@gmail.com>
1 parent afcbabe commit a4f8f1b

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

advertools/emoji.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@
116116

117117
def _emoji_df_path() -> str:
118118
from os.path import join
119-
dirname = adv.__path__[0]
120-
return join(dirname, "emoji_df.parquet")
119+
return join("advertools", "pkg_data", "emoji_df.parquet")
121120

122121

123122
def _emoji_entries(emoji):

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@ keywords = ["seo", "marketing", "advertising", "adwords", "bingads", "search-eng
2828
advertools = "advertools.cli:main"
2929
adv = "advertools.cli:main"
3030

31-
3231
[project.urls]
3332
Homepage = "https://adver.tools"
3433
Documentation = "https://advertools.readthedocs.io"
3534
Repository = "https://github.com/eliasdabbas/advertools.git"
3635
Issues = "https://github.com/eliasdabbas/advertools/issues"
3736
Changelog = "https://github.com/eliasdabbas/advertools/blob/master/HISTORY.rst"
3837

38+
[tool.flit.external-data]
39+
directory = "advertools/pkg_data"
40+
3941
[tool.ruff]
4042
target-version = "py37"
4143

42-
4344
[tool.ruff.lint]
4445
# Add the `line-too-long` rule to the enforced rule set.
4546
extend-select = ["E501"]

requirements_dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pip
2+
build
23
wheel
34
flake8
45
tox

0 commit comments

Comments
 (0)