Skip to content

Commit c035a37

Browse files
rasjaniaaltat
authored andcommitted
Restructure robotlibcore into smalle chunks
pr splits robotlibcore.py into smaller source files to rework packaging to be placed into directory inside site-packages instead of single file into root of site-packages Fixes #149
1 parent d5123c7 commit c035a37

16 files changed

+655
-441
lines changed

BUILD.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ respectively.
130130
# Set version
131131

132132
1. Set version information in
133-
[src/robotlibcore.py](src/robotlibcore.py):
133+
[src/robotlibcore/__init__.py](src/robotlibcore/__init__.py):
134134

135135
invoke set-version $VERSION
136136

137137
2. Commit and push changes:
138138

139-
git commit -m "Updated version to $VERSION" src/robotlibcore.py
139+
git commit -m "Updated version to $VERSION" src/robotlibcore/__init__.py
140140
git push
141141

142142
# Tagging
@@ -192,7 +192,7 @@ respectively.
192192
2. Set dev version based on the previous version:
193193

194194
invoke set-version dev
195-
git commit -m "Back to dev version" src/robotlibcore.py
195+
git commit -m "Back to dev version" src/robotlibcore/__init__.py
196196
git push
197197

198198
For example, `1.2.3` is changed to `1.2.4.dev1` and `2.0.1a1` to

setup.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env python
22
import re
3-
from os.path import abspath, dirname, join
3+
from pathlib import Path
4+
from os.path import join
45

56
from setuptools import find_packages, setup
67

7-
CURDIR = dirname(abspath(__file__))
8+
CURDIR = Path(__file__).parent
89

910
CLASSIFIERS = """
1011
Development Status :: 5 - Production/Stable
@@ -21,10 +22,11 @@
2122
Topic :: Software Development :: Testing
2223
Framework :: Robot Framework
2324
""".strip().splitlines()
24-
with open(join(CURDIR, 'src', 'robotlibcore.py')) as f:
25-
VERSION = re.search('\n__version__ = "(.*)"', f.read()).group(1)
26-
with open(join(CURDIR, 'README.md')) as f:
27-
LONG_DESCRIPTION = f.read()
25+
26+
version_file = Path(CURDIR / 'src' / 'robotlibcore' / '__init__.py')
27+
VERSION = re.search('\n__version__ = "(.*)"', version_file.read_text()).group(1)
28+
29+
LONG_DESCRIPTION = Path(CURDIR / 'README.md').read_text()
2830

2931
DESCRIPTION = ('Tools to ease creating larger test libraries for '
3032
'Robot Framework using Python.')
@@ -43,6 +45,5 @@
4345
classifiers = CLASSIFIERS,
4446
python_requires = '>=3.8, <4',
4547
package_dir = {'': 'src'},
46-
packages = find_packages('src'),
47-
py_modules = ['robotlibcore'],
48+
packages = ["robotlibcore","robotlibcore.core", "robotlibcore.keywords", "robotlibcore.plugin", "robotlibcore.utils"]
4849
)

0 commit comments

Comments
 (0)