From 1581e0ff02462d60a3d51f35df95080519ce5325 Mon Sep 17 00:00:00 2001
From: Rahil Doshi <rahil.doshi@fau.de>
Date: Wed, 20 Nov 2024 21:00:43 +0100
Subject: [PATCH] Add setup.py and update .gitignore and pyproject.toml

---
 .gitignore     |  1 +
 pyproject.toml |  2 +-
 setup.py       | 45 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 setup.py

diff --git a/.gitignore b/.gitignore
index bdaff96..7673dcf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ __pycache__
 .idea
 *.egg-info*
 **/cmake-build*/
+/build
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 1ce593d..45776b5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,7 +47,7 @@ addopts = "-v" # --cov=pymatlib
 testpaths = [
     "tests",
 ]
-# pythonpath = ["src"]
+pythonpath = ["src"]
 
 [tool.setuptools]
 include-package-data = true
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..a2dfe65
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,45 @@
+from setuptools import setup, find_packages
+import versioneer
+
+
+def get_cmdclass():
+    return versioneer.get_cmdclass()
+
+setup(
+    name='pymatlib',
+    # version='0.1.0',  # Update this version as needed
+    version=versioneer.get_version(),
+    author='Rahil Doshi',  # Replace with your name
+    author_email='rahil.doshi@fau.de',  # Replace with your email
+    description='A Python based material library',
+    long_description=open('README.md').read(),  # Ensure you have a README.md file
+    long_description_content_type='text/markdown',
+    url='https://i10git.cs.fau.de/rahil.doshi/pymatlib',  # Replace with your repository URL
+    packages=find_packages(where='src'),  # Automatically find packages in the src directory
+    package_dir={'': 'src'},  # Set the source directory
+    classifiers=[
+        'Programming Language :: Python :: 3',
+        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
+        'Operating System :: OS Independent',
+        'Development Status :: 3 - Alpha',  # Adjust as necessary
+        'Intended Audience :: Developers',
+        'Intended Audience :: Science/Research',
+        'Topic :: Scientific/Engineering',
+    ],
+    python_requires='>=3.10',  # Specify the minimum Python version required
+    install_requires=[
+        'numpy>=1.18.0',  # Specify required packages and their versions
+        'sympy>=1.7.0',
+        'pytest>=6.0.0',
+        'pystencils@git+https://i10git.cs.fau.de/pycodegen/pystencils.git@v2.0-dev'
+    ],
+    extras_require={
+        'dev': [
+            'pytest-cov',  # For coverage reporting during tests
+            'flake8',      # For style checking
+            'black',       # For code formatting
+        ],
+    },
+    include_package_data=True,  # Include package data specified in MANIFEST.in
+    cmdclass=get_cmdclass(),  # Add command class from versioneer
+)
-- 
GitLab