overhall, added proper source dir and and improved code to not need python anymore and renaming it
Gitea Actions For Tree-Structurer / Explore-Gitea-Actions (push) Successful in 25s Details

This commit is contained in:
Falko Victor Habel 2025-01-30 11:37:49 +01:00
parent 9884d36360
commit 380b3aacb2
10 changed files with 26 additions and 10 deletions

View File

@ -1,4 +1,4 @@
from tree_structurer import create_tree_structurer, get_structure
from prodir import create_tree_structurer, get_structure
create_tree_structurer()
for file in get_structure():

10
pyproject.toml Normal file
View File

@ -0,0 +1,10 @@
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "prodir"
version = "0.0.6"
description = "A module for analyzing directory structures"
scripts = {prodir = "prodir.__main__:main"}
dependencies = []

View File

@ -1,4 +1,4 @@
from setuptools import setup, Extension
from setuptools import setup, Extension, find_packages
import platform
extra_compile_args = []
@ -11,17 +11,23 @@ else:
extra_compile_args.append('-std=c++17')
tree_structurer_module = Extension(
'tree_structurer._tree_structurer',
sources=['tree_structurer/cpp/bindings.cpp', 'tree_structurer/cpp/tree_structurer.cpp'],
include_dirs=['tree_structurer/cpp'],
'prodir._tree_structurer', # Remove 'src.' from the module name
sources=['src/prodir/cpp/bindings.cpp', 'src/prodir/cpp/tree_structurer.cpp'],
include_dirs=['src/prodir/tree_structurer/cpp'],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
)
setup(
name='tree_structurer',
name='prodir',
version='0.0.6',
description='A module for analyzing directory structures',
ext_modules=[tree_structurer_module],
packages=['tree_structurer'],
packages=find_packages(where="src"),
package_dir={"": "src"},
entry_points={
"console_scripts": [
"prodir=prodir.__main__:main",
],
},
)

1
src/prodir/__init__.py Normal file
View File

@ -0,0 +1 @@
from prodir._tree_structurer import create_tree_structurer, get_structure

View File

@ -1,7 +1,7 @@
import os
import sys
import argparse
from tree_structurer import create_tree_structurer, get_structure
from prodir import create_tree_structurer, get_structure
def main():
parser = argparse.ArgumentParser(description='Display directory structure in a tree-like format')

View File

@ -1,6 +1,6 @@
import pytest
from pathlib import Path
from tree_structurer import create_tree_structurer, get_structure
from prodir import create_tree_structurer, get_structure
def test_basic_structure(temp_directory):
"""Test that the basic directory structure is correctly represented."""

View File

@ -1 +0,0 @@
from tree_structurer._tree_structurer import create_tree_structurer, get_structure