Skip to content

Commit

Permalink
Remove devtools option and reauirements files
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Sep 23, 2024
1 parent ff65b87 commit 33d09ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,4 @@ pip_requirements_dev:
- pytest
- twisted
- pytest-benchmark
- sip
- sip
20 changes: 1 addition & 19 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ class UraniumConan(ConanFile):
python_requires = "translationextractor/[>=2.2.0]@ultimaker/cura_11622"

options = {
"devtools": [True, False],
"enable_i18n": [True, False],
}
default_options = {
"devtools": False,
"enable_i18n": False,
}

Expand All @@ -53,12 +51,6 @@ def _base_dir(self):
else:
return Path(self.source_folder, "venv")

@property
def requirements_txts(self):
if self.options.get_safe("devtools", False):
return ["requirements.txt", "requirements-dev.txt"]
return ["requirements.txt"]

@property
def _share_dir(self):
return self._base_dir.joinpath("share")
Expand Down Expand Up @@ -94,8 +86,6 @@ def export_sources(self):
os.path.join(self.export_sources_folder, "resources"), excludes="*.mo")
copy(self, "*", os.path.join(self.recipe_folder, "tests"), os.path.join(self.export_sources_folder, "tests"))
copy(self, "*", os.path.join(self.recipe_folder, "UM"), os.path.join(self.export_sources_folder, "UM"))
copy(self, "requirements.txt", self.recipe_folder, self.export_sources_folder)
copy(self, "requirements-dev.txt", self.recipe_folder, self.export_sources_folder)

def config_options(self):
if self.settings.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", check_type=str):
Expand Down Expand Up @@ -150,8 +140,7 @@ def layout(self):
self.folders.generators = os.path.join(self.folders.build, "conan")

self.cpp.package.libdirs = [os.path.join("site-packages", "UM")]
self.cpp.package.resdirs = ["resources", "plugins",
"pip_requirements"] # Note: pip_requirements should be the last item in the list
self.cpp.package.resdirs = ["resources", "plugins"]

self.layouts.source.runenv_info.prepend_path("PYTHONPATH", ".")
self.layouts.source.runenv_info.prepend_path("PYTHONPATH", "plugins")
Expand All @@ -167,15 +156,8 @@ def package(self):
dst=os.path.join(self.package_folder, self.cpp.package.resdirs[0]))
copy(self, "*", src=os.path.join(self.source_folder, "plugins"),
dst=os.path.join(self.package_folder, self.cpp.package.resdirs[1]))
copy(self, "requirement*.txt", src=self.source_folder,
dst=os.path.join(self.package_folder, self.cpp.package.resdirs[-1]))

def package_info(self):
self.user_info.pip_requirements = "requirements.txt"
self.user_info.pip_requirements_build = "requirements-dev.txt"

def package_id(self):
self.info.clear()

self.info.options.rm_safe("devtools")
self.info.options.rm_safe("enable_i18n")

0 comments on commit 33d09ca

Please sign in to comment.