Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 6f924c3

Browse files
sudharsana-kjlpdxjohnny
authored andcommitted
source: mysql: Fix setup_common packaging issue
Signed-off-by: John Andersen <[email protected]>
1 parent fd28b9a commit 6f924c3

File tree

6 files changed

+23
-14
lines changed

6 files changed

+23
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
and all their ancestors to check redundancy (a hold over from pre uid days).
2424
It now correctly only uses the inputs in the parameter set. This fixes a major
2525
performance issue.
26+
- MySQL packaging issue.
2627
### Removed
2728
- CLI command `operations` removed in favor of `dataflow run`
2829

source/mysql/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include README.md
22
include LICENSE
3+
include setup_common.py

source/mysql/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# DFFML REPLACE_PACKGE_NAME Service
1+
# DFFML Source for MySQL Protocol
22

33
## About
44

5-
Description
5+
Provides access to MySQL Protocol compatible databases
66

77
## Usage
88

9-
```console
10-
# Command line usage here
11-
```
9+
See [documentation](https://intel.github.io/dffml/plugins/dffml_source.html#dffml-source-mysql)
1210

1311
## License
1412

15-
REPLACE_PACKGE_NAME Service is distributed under the terms of the
13+
DFFML Source for MySQL Protocol is distributed under the terms of the
1614
[MIT License](LICENSE).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.0.2"
1+
VERSION = "0.0.3"

source/mysql/setup.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1+
import os
2+
import importlib.util
13
from setuptools import setup
24

3-
from dffml_setup_common import SETUP_KWARGS, IMPORT_NAME
5+
# Boilerplate to load commonalities
6+
spec = importlib.util.spec_from_file_location(
7+
"setup_common", os.path.join(os.path.dirname(__file__), "setup_common.py")
8+
)
9+
common = importlib.util.module_from_spec(spec)
10+
spec.loader.exec_module(common)
411

5-
SETUP_KWARGS["install_requires"] += ["aiomysql>=0.0.20"]
6-
SETUP_KWARGS["tests_require"] = ["docker>=4.0.2"]
7-
SETUP_KWARGS["entry_points"] = {
8-
"dffml.source": [f"mysql = {IMPORT_NAME}.source:MySQLSource"]
12+
common.KWARGS["entry_points"] = {
13+
"dffml.source": [f"mysql = {common.IMPORT_NAME}.source:MySQLSource"]
914
}
1015

11-
setup(**SETUP_KWARGS)
16+
common.KWARGS["install_requires"] += ["aiomysql>=0.0.20"]
17+
18+
common.KWARGS["tests_require"] = ["docker>=4.0.2"]
19+
20+
setup(**common.KWARGS)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
README = Path(SELF_PATH, "README.md").read_text()
5252

53-
SETUP_KWARGS = dict(
53+
KWARGS = dict(
5454
name=NAME,
5555
version=VERSION,
5656
description=DESCRIPTION,

0 commit comments

Comments
 (0)