sortphotos
sortphotos copied to clipboard
77 pypi prep
Related to #77, I want to suggest some minor improvements to the structure of the repository.
Currently all sourcecode is located in the src/ directory, meaning from the current setup.py, a python package structure of sortphotos will look something like this in site-packages.
(sortphotos) [flex@jackal]: ~/sandbox/foo/sortphotos>$ ls lib/python3.8/site-packages/
_distutils_hack/ pip-20.2.4.virtualenv setuptools-50.3.2.virtualenv _virtualenv.py
distutils-precedence.pth pkg_resources/ sortphotos/ wheel/
easy_install.py __pycache__/ sortphotos-1.0.dist-info/ wheel-0.35.1.dist-info/
pip/ setuptools/ src/ wheel-0.35.1.virtualenv
pip-20.2.4.dist-info/ setuptools-50.3.2.dist-info/ _virtualenv.pth
(sortphotos) [flex@jackal]: ~/sandbox/foo/sortphotos>$ tree src/ -d
src/
├── Image-ExifTool
│ └── lib
│ ├── File
│ └── Image
│ └── ExifTool
│ ├── Charset
│ └── Lang
└── __pycache__
Renaming src to sortphotos we get
(sortphotos) [flex@jackal]: ~/sandbox/foo/sortphotos>$ ls lib/python3.8/site-packages/
_distutils_hack/ pip-20.2.4.virtualenv setuptools-50.3.2.virtualenv _virtualenv.py
distutils-precedence.pth pkg_resources/ sortphotos/ wheel/
easy_install.py __pycache__/ sortphotos-1.0.dist-info/ wheel-0.35.1.dist-info/
pip/ setuptools/ src/ wheel-0.35.1.virtualenv
pip-20.2.4.dist-info/ setuptools-50.3.2.dist-info/ _virtualenv.pth
(sortphotos) [flex@jackal]: ~/sandbox/foo/sortphotos>$ tree sortphotos -d
sortphotos
├── Image-ExifTool
│ └── lib
│ ├── File
│ └── Image
│ └── ExifTool
│ ├── Charset
│ └── Lang
└── __pycache__
To run the sortphotos.py more neatly, I have also proposed to add a main.py in module entry folder (sortphotos). In the current setup, one has to download the repo and run the module from within.
After creating a wheel or tar package and do pip install, an end user can simply do: python -m sortphotos -h