Add a symlink supybot pointing to src/ + move locales/ to src/

This looks like a more standard source tree, and allows for running tests without installing.
This commit is contained in:
Valentin Lorentz 2019-01-02 14:29:32 +01:00
parent 4693537055
commit b1db15c056
12 changed files with 9 additions and 16 deletions

1
.gitignore vendored
View File

@ -23,7 +23,6 @@ supybot.egg-info/
test-conf/ test-conf/
test-data/ test-data/
test-logs/ test-logs/
src/version.py
INSTALL INSTALL
README.txt README.txt
conf/ conf/

View File

@ -1,4 +1,4 @@
PYTHON=`which python` PYTHON=`which python3`
DESTDIR=/ DESTDIR=/
PROJECT=limnoria PROJECT=limnoria
@ -10,6 +10,9 @@ all:
@echo "make builddeb_py3 - Generate a deb package for Python 3" @echo "make builddeb_py3 - Generate a deb package for Python 3"
@echo "make clean - Get rid of scratch and byte files" @echo "make clean - Get rid of scratch and byte files"
test:
PATH=./scripts/:${PATH} PYTHONPATH=. $(PYTHON) ./scripts/supybot-test test --plugins-dir=plugins/
source: source:
$(PYTHON) setup.py sdist $(COMPILE) $(PYTHON) setup.py sdist $(COMPILE)
@ -35,4 +38,5 @@ clean:
rm -rf build/ MANIFEST rm -rf build/ MANIFEST
find . -name '*.pyc' -delete find . -name '*.pyc' -delete
rm debian/control rm debian/control
.PHONY: test

View File

@ -147,19 +147,9 @@ packages = ['supybot',
'supybot.plugins.Math.local', 'supybot.plugins.Math.local',
] ]
package_dir = {'supybot': 'src', package_data = {'supybot.locales': [s for s in os.listdir('supybot/locales/')]}
'supybot.utils': 'src/utils',
'supybot.locales': 'locales',
'supybot.plugins': 'plugins',
'supybot.drivers': 'src/drivers',
'supybot.plugins.Dict.local': 'plugins/Dict/local',
'supybot.plugins.Math.local': 'plugins/Math/local',
}
package_data = {'supybot.locales': [s for s in os.listdir('locales/')]}
for plugin in plugins: for plugin in plugins:
package_dir['supybot.plugins.' + plugin] = 'plugins/' + plugin
locales_path = 'plugins/' + plugin + '/locales/' locales_path = 'plugins/' + plugin + '/locales/'
locales_name = 'supybot.plugins.'+plugin locales_name = 'supybot.plugins.'+plugin
if os.path.exists(locales_path): if os.path.exists(locales_path):
@ -210,8 +200,6 @@ setup(
# Installation data # Installation data
packages=packages, packages=packages,
package_dir=package_dir,
package_data=package_data, package_data=package_data,
scripts=['scripts/supybot', scripts=['scripts/supybot',

1
src/plugins Symbolic link
View File

@ -0,0 +1 @@
../plugins

1
supybot Symbolic link
View File

@ -0,0 +1 @@
src