Skip to content

Commit

Permalink
Migrate to a src/ layout
Browse files Browse the repository at this point in the history
Closes #180
  • Loading branch information
kurtmckee committed Sep 18, 2024
1 parent 5bf5078 commit 6ae8675
Show file tree
Hide file tree
Showing 170 changed files with 40 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ htmlcov/
.coverage.*

# Generated by SWIG
smartcard/scard/scard.py
smartcard/scard/scard_wrap.c
src/smartcard/scard/scard.py
src/smartcard/scard/scard_wrap.c

# Generated by test suite
local_config.py
Expand Down
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Unreleased changes
==================
* Remove Python 2 conditional code
* Migrate a `src/` layout.

2.1.1 (September 2024)
======================
Expand Down
10 changes: 5 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ python framework with objects wrapping PCSC API.

Documentation
-------------
All documentation is provided in the `smartcard/doc` directory of the
source distribution. Examples are provided in the `smartcard/Examples`
All documentation is provided in the `src/smartcard/doc` directory of the
source distribution. Examples are provided in the `src/smartcard/Examples`
directory of the source distribution. The binary distribution does not
include any documentation, tests scripts or examples.

Expand Down Expand Up @@ -118,11 +118,11 @@ your python distribution, e.g.

Developer documentation, unit tests and examples
------------------------------------------------
The developer documentation is in the `smartcard/doc/` directory of the
The developer documentation is in the `src/smartcard/doc/` directory of the
source distribution.

Examples are located in the `smartcard/Examples/` directory, and the pyunit
unit tests in the `smartcard/test/` directory.
Examples are located in the `src/smartcard/Examples/` directory, and the pyunit
unit tests in the `src/smartcard/test/` directory.

Build instructions for packagers
--------------------------------
Expand Down
40 changes: 20 additions & 20 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ include MANIFEST.in
include Makefile
include README.md
include TODO
include smartcard/scard/PcscDefs.i
include smartcard/scard/PcscTypemaps.i
include smartcard/scard/gemalto.ver
include smartcard/scard/helpers.c
include smartcard/scard/helpers.h
include smartcard/scard/memlog.h
include smartcard/scard/pcsctypes.h
include smartcard/scard/pyscard-reader.h
include smartcard/scard/scard.def
include smartcard/scard/scard.i
include smartcard/scard/scard.rc
include smartcard/scard/winscarddll.c
include smartcard/scard/winscarddll.h
include smartcard/test/configcheck.py
recursive-include smartcard/Examples *.py *.ico
recursive-include smartcard/doc *.html *.jpg *.css *.js *.png *.txt
recursive-include smartcard/test/framework *.txt *.py
recursive-include smartcard/test/frameworkpcsc *.txt *.py
recursive-include smartcard/test/scard *.txt *.py
recursive-include smartcard/wx *.ico
include src/smartcard/scard/PcscDefs.i
include src/smartcard/scard/PcscTypemaps.i
include src/smartcard/scard/gemalto.ver
include src/smartcard/scard/helpers.c
include src/smartcard/scard/helpers.h
include src/smartcard/scard/memlog.h
include src/smartcard/scard/pcsctypes.h
include src/smartcard/scard/pyscard-reader.h
include src/smartcard/scard/scard.def
include src/smartcard/scard/scard.i
include src/smartcard/scard/scard.rc
include src/smartcard/scard/winscarddll.c
include src/smartcard/scard/winscarddll.h
include src/smartcard/test/configcheck.py
recursive-include src/smartcard/Examples *.py *.ico
recursive-include src/smartcard/doc *.html *.jpg *.css *.js *.png *.txt
recursive-include src/smartcard/test/framework *.txt *.py
recursive-include src/smartcard/test/frameworkpcsc *.txt *.py
recursive-include src/smartcard/test/scard *.txt *.py
recursive-include src/smartcard/wx *.ico
include test/*.py
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ install: clean
clean:
$(PYTHON) setup.py clean
rm -rf build
rm -f smartcard/scard/_scard*.so
rm -f src/smartcard/scard/_scard*.so

pypi: clean
# files generated by swig
rm -f smartcard/scard/scard.py
rm -f smartcard/scard/scard_wrap.c
rm -f src/smartcard/scard/scard.py
rm -f src/smartcard/scard/scard_wrap.c
# files generated by sphinx
rm -rf smartcard/doc/_build
rm -rf src/smartcard/doc/_build
# files generated by pydoctor
rm -rf smartcard/doc/html
rm -rf src/smartcard/doc/html
rm -rf dist
$(PYTHON) -m build
python3 -m twine upload dist/*
Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
platform__cc_defines = [('WIN32', '100')]
platform_swig_opts = ['-DWIN32']
if 'mingw' not in get_platform():
platform_sources = ['smartcard/scard/scard.rc']
platform_sources = ['src/smartcard/scard/scard.rc']
platform_libraries = ['winscard']

elif platform.system() == 'Darwin':
Expand Down Expand Up @@ -98,7 +98,7 @@ def run(self):
"smartcard.util",
"smartcard.wx",
],
'package_dir': {"": "."},
'package_dir': {"": "src"},
'package_data': {
"smartcard.wx": ["resources/*.ico"],
},
Expand All @@ -110,17 +110,17 @@ def run(self):
('VER_PRODUCTVERSION', VERSION_ALT),
('VER_PRODUCTVERSION_STR', VERSION_STR)] \
+ platform__cc_defines,
include_dirs=['smartcard/scard/'] \
include_dirs=['src/smartcard/scard/'] \
+ platform_include_dirs,
sources=["smartcard/scard/helpers.c",
"smartcard/scard/winscarddll.c",
"smartcard/scard/scard.i"] \
sources=["src/smartcard/scard/helpers.c",
"src/smartcard/scard/winscarddll.c",
"src/smartcard/scard/scard.i"] \
+ platform_sources,
libraries=platform_libraries,
extra_compile_args=platform_extra_compile_args,
extra_link_args=platform_extra_link_args,
swig_opts=['-outdir',
'smartcard/scard'] \
'src/smartcard/scard'] \
+ platform_swig_opts)],
'extras_require': {
'Gui': ['wxPython'],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6ae8675

Please sign in to comment.