Skip to content

Commit

Permalink
reformed to work with poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Feb 4, 2024
1 parent 461ee4b commit f0ab815
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 20 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion src/classes/cli.py → git_fleximod/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

__version__ = "0.5.0"


def find_root_dir(filename=".git"):
d = Path.cwd()
root = Path(d.root)
Expand Down
12 changes: 6 additions & 6 deletions src/git-fleximod → git_fleximod/git-fleximod.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import shutil
import logging
import textwrap
from classes import utils
from classes import cli
from classes.gitinterface import GitInterface
from classes.gitmodules import GitModules
from git_fleximod import utils
from git_fleximod import cli
from git_fleximod.gitinterface import GitInterface
from git_fleximod.gitmodules import GitModules
from configparser import NoOptionError

# logger variable is global
Expand Down Expand Up @@ -343,7 +343,7 @@ def submodules_test(gitmodules, root_dir):
return testfails + localmods


def _main_func():
def main():
(
root_dir,
file_name,
Expand Down Expand Up @@ -393,4 +393,4 @@ def _main_func():


if __name__ == "__main__":
sys.exit(_main_func())
sys.exit(main())
3 changes: 1 addition & 2 deletions src/classes/gitinterface.py → git_fleximod/gitinterface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
from classes import utils

from . import utils

class GitInterface:
def __init__(self, repo_path, logger):
Expand Down
2 changes: 1 addition & 1 deletion src/classes/gitmodules.py → git_fleximod/gitmodules.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import shutil
from configparser import ConfigParser
from classes.lstripreader import LstripReader
from .lstripreader import LstripReader


class GitModules(ConfigParser):
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 6 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ license = "MIT"
readme = "README.md"
homepage = "https://github.com/jedwards4b/git-fleximod"
keywords = ["git", "submodule", "sparse-checkout"]
packages = [
{ include = "src/git-fleximod" },
{ include = "src/classes/*.py" },
{ include = "License" },
{ include = "tests" },
{ include = "doc/*.rst" },
{ include = "doc/Makefile" },
{ include = "doc/make.bat" },
{ include = "doc/conf.py" },
]

[[tool.poetry.packages]]
include = "git_fleximod"

[tool.poetry.scripts]
git-fleximod = "git_fleximod.git-fleximod:main"

[tool.poetry.dependencies]
python = "^3.8"
Expand Down
Empty file removed src/classes/__init__.py
Empty file.

0 comments on commit f0ab815

Please sign in to comment.