Skip to content

Commit e340807

Browse files
committed
Update repository structure
1 parent cc85ae5 commit e340807

29 files changed

+5317
-22
lines changed

.pylintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Add <file or directory> to the black list. It should be a base name, not a
44
# path. You may set this option multiple times.
5-
ignore=utils,test
5+
ignore=utils,tests
66

77
[MESSAGES CONTROL]
88

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ install:
44
- pip install cython
55
- make cythonize
66
script:
7-
- tox -v
7+
- tox
88
language: python
99
python:
1010
- 3.5

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
recursive-include dependency_injector *.py *.pyx *.pxd *.c
1+
recursive-include src/dependency_injector *.py *.pyx *.pxd *.c
22
include README.rst
33
include CONTRIBUTORS.rst
44
include LICENSE.rst

Makefile

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION := $(shell python setup.py --version)
22

3-
CYTHON_SRC := $(shell find dependency_injector -name '*.pyx')
3+
CYTHON_SRC := $(shell find src/dependency_injector -name '*.pyx')
44

55
CYTHON_DIRECTIVES =
66

@@ -12,11 +12,11 @@ endif
1212

1313
clean:
1414
# Clean sources
15-
find dependency_injector -name '*.py[cod]' -delete
16-
find dependency_injector -name '__pycache__' -delete
17-
find dependency_injector -name '*.c' -delete
18-
find dependency_injector -name '*.so' -delete
19-
find dependency_injector -name '*.html' -delete
15+
find src -name '*.py[cod]' -delete
16+
find src -name '__pycache__' -delete
17+
find src -name '*.c' -delete
18+
find src -name '*.so' -delete
19+
find src -name '*.html' -delete
2020
# Clean tests
2121
find tests -name '*.py[co]' -delete
2222
find tests -name '__pycache__' -delete
@@ -29,16 +29,19 @@ cythonize:
2929
cython -a $(CYTHON_DIRECTIVES) $(CYTHON_SRC)
3030
# Move all Cython html reports
3131
mkdir -p reports/cython/
32-
find dependency_injector -name '*.html' -exec mv {} reports/cython/ \;
32+
find src -name '*.html' -exec mv {} reports/cython/ \;
3333

3434
build: clean cythonize
3535
# Compile C extensions
3636
python setup.py build_ext --inplace
3737

38+
install: clean cythonize
39+
python setup.py install
40+
3841
test:
3942
# Unit tests with coverage report
4043
coverage erase
41-
coverage run --rcfile=./.coveragerc -m unittest2 discover tests
44+
coverage run --rcfile=./.coveragerc -m unittest2 discover tests/unit
4245
coverage report --rcfile=./.coveragerc
4346
coverage html --rcfile=./.coveragerc
4447

setup.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
requirements = version.readlines()
1616

1717
# Getting version:
18-
with open('dependency_injector/__init__.py') as init_file:
18+
with open('src/dependency_injector/__init__.py') as init_file:
1919
version = re.search('VERSION = \'(.*?)\'', init_file.read()).group(1)
2020

2121
# Defining macros:
@@ -34,15 +34,19 @@
3434
maintainer='Roman Mogilatov',
3535
maintainer_email='[email protected]',
3636
url='https://github.com/ets-labs/python-dependency-injector',
37-
bugtrack_url='https://github.com/ets-labs/python-dependency-injector' +
38-
'/issues',
3937
download_url='https://pypi.python.org/pypi/dependency_injector',
4038
install_requires=requirements,
41-
packages=['dependency_injector',
42-
'dependency_injector.providers'],
39+
packages=[
40+
'dependency_injector',
41+
'dependency_injector.providers',
42+
],
43+
package_dir={
44+
'dependency_injector': 'src/dependency_injector',
45+
'dependency_injector.providers': 'src/dependency_injector/providers',
46+
},
4347
ext_modules=[
4448
Extension('dependency_injector.injections',
45-
['dependency_injector/injections.c'],
49+
['src/dependency_injector/injections.c'],
4650
define_macros=defined_macros,
4751
extra_compile_args=['-O2']),
4852
],
File renamed without changes.

dependency_injector/errors.py renamed to src/dependency_injector/errors.py

-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ class Error(Exception):
66
77
All dependency injector errors extend this error class.
88
"""
9-
10-
print(__file__, __name__)

0 commit comments

Comments
 (0)