Skip to content

Commit

Permalink
install step
Browse files Browse the repository at this point in the history
  • Loading branch information
emcf committed Mar 22, 2024
1 parent 133caa7 commit daed073
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <img src="https://rpnutzemutbrumczwvue.supabase.co/storage/v1/object/public/assets/pipeline_small%20(1).png" alt="Pipeline Illustration" style="width:96px; height:96px; vertical-align:middle;"> The Pipe
# <img src="https://rpnutzemutbrumczwvue.supabase.co/storage/v1/object/public/assets/pipeline_small%20(1).png" alt="Pipeline Illustration" style="width:96px; height:72px; vertical-align:middle;"> The Pipe

[![codecov](https://codecov.io/gh/emcf/thepipe/graph/badge.svg?token=KHD1PDOSHF)](https://codecov.io/gh/emcf/thepipe) ![python-gh-action](https://github.com/emcf/thepipe/actions/workflows/python-ci.yml/badge.svg)

Expand Down
32 changes: 32 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os
import platform
import sys

def install_ctags():
# Check if the operating system is not Windows
if platform.system() != 'Windows':
# Detect the package manager based on the distribution
if os.path.exists('/usr/bin/apt-get'):
# Detect if already installed
if os.path.exists('/usr/bin/ctags'):
return
# Debian-based systems (like Ubuntu)
os.system('sudo apt-get update && sudo apt-get install -y ctags')
elif os.path.exists('/usr/bin/yum'):
# Detect if already installed
if os.path.exists('/usr/bin/ctags'):
return
# Red Hat-based systems (like Fedora or CentOS)
os.system('sudo yum install -y ctags')
elif os.path.exists('/usr/bin/pacman'):
# Detect if already installed
if os.path.exists('/usr/bin/ctags'):
return
# Arch-based systems
os.system('sudo pacman -Syu --noconfirm ctags')
else:
print("Unsupported Linux distribution or missing package manager.")
sys.exit(1)
else:
print("This script does not support Windows.")
sys.exit(1)
1 change: 1 addition & 0 deletions tests/test_extract.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

import setup
import unittest
import os
from thepipe import extract # Assuming thepipe has an extract function
Expand Down
1 change: 1 addition & 0 deletions thepipe.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import setup
import argparse
from extractor import get_all_contents
from representor import create_compressed_project_context
Expand Down

0 comments on commit daed073

Please sign in to comment.