Skip to content

Commit

Permalink
Move to src directory, use importlib, stop using setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mangelajo committed Aug 25, 2024
1 parent bf6abee commit 33b3f8e
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 38 deletions.
5 changes: 3 additions & 2 deletions distribute.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
python3 setup.py sdist upload --sign
#python3 setup.py bdist_egg upload --sign
rm dist/*
uv run python3 -m build
uv run twine upload dist/*

1 change: 0 additions & 1 deletion photosort/version.py

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ dev-dependencies = [
"mock>=5.1.0",
"setuptools>=73.0.1",
"twine>=5.1.1",
"build>=1.2.1",
]
23 changes: 0 additions & 23 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion photosort/media.py → src/photosort/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import stat
import sys

from photosort import exif
from . import exif


class UnknownDatetime(Exception):
Expand Down
2 changes: 0 additions & 2 deletions photosort/photodb.py → src/photosort/photodb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- mode: python; coding: utf-8 -*-
from __future__ import print_function

__author__ = "Miguel Angel Ajo Pelayo"
__email__ = "[email protected]"
__copyright__ = "Copyright (C) 2013 Miguel Angel Ajo Pelayo"
Expand Down
17 changes: 9 additions & 8 deletions photosort/photosort.py → src/photosort/photosort.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@

__author__ = "Miguel Angel Ajo Pelayo"
__email__ = "[email protected]"
__copyright__ = "Copyright (C) 2013 Miguel Angel Ajo Pelayo"
__copyright__ = "Copyright (C) Miguel Angel Ajo Pelayo"
__license__ = "GPLv3"

import argparse
from importlib.metadata import version
import logging
import os
import sys
import time
import traceback

from photosort import config
from photosort import exif
from photosort import media
from photosort import photodb
from photosort import walk
from photosort.version import VERSION

from . import config
from . import exif
from . import media
from . import photodb
from . import walk


class PhotoSort:
Expand Down Expand Up @@ -113,7 +114,7 @@ def monitor(self):

@staticmethod
def version():
print("photosort version %s" % VERSION)
print("photosort version %s" % version('photosort'))


def main():
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.
2 changes: 1 addition & 1 deletion photosort/walk.py → src/photosort/walk.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os
import time

from photosort import media
from . import media


class WalkForMedia:
Expand Down
27 changes: 27 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33b3f8e

Please sign in to comment.